manthanhd / talkify

Talkify is an open source framework with an aim to standardize and model conversational AI enabling development of personal assistants and chat bots. The mission of this framework is to make developing chat bots and personal assistants as easy as spinning up a simple website in html.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Methods should be chainable

manthanhd opened this issue · comments

// proposed
new Bot().train(topic, sentence).addSkill(skill).resolve(....)

// current
var bot = new Bot();
bot.train(topic, sentence);
bot.addSkill(skill);
bot.resolve(....);

Isn't it just enough to add return this; in each method? It will return the original Bot object so that all other methods are still defined.

@rafaelklaessen you are right. See pull request #17 for updates.

Closing as @marekhakala's merge request has been merged.

ezoic increase your site revenue