Git Product home page Git Product logo

manthanhd / talkify Goto Github PK

View Code? Open in Web Editor NEW
74.0 10.0 17.0 125 KB

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.

License: MIT License

JavaScript 100.00%
bot chatbot framework javascript

talkify's Issues

Add filters

Filters are functions that can be run before the request makes it to the skills. This is pre-classification so the filter can get the basic metadata like the sentence etc.

A filter once set runs for every call, every time.

var myfilter = new RequestFilter(function(context, request, response, next) {
    ...
    return next();
});

Support array input for terms in TrainingDocument

When training my bot I want to be able to provide an array of terms to match to one skill. It is really awkward to create a TrainingDocument for every permutation of a search term when trying to match them to 1 skill. Allow for creating TrainingDocuments maybe?

Multi-sentence queries don't work properly when sentences are all lower case

Current logic relies on having an upper case letter followed by a whitespace after a period. So the following is fine:

Hello. How are you doing?

While this won't work:

hello. how are you doing?

Solution might involve capitalizing letters after spaces before splitting it but then it won't work with the following sentence:

Hello Mr. Anderson. How are you today?

That will detect three sentences like so:

Hello Mr.
Anderson.
How are you today?

Maybe certain words are excluded from sentence splitting and therefore are part of the same sentence?

Methods should be chainable

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

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

Allow follow-up questions to a skill

Special flag in context to be set followUp mapped to a skill name.

This also means that each skill needs a unique name before it can be added to the bot.

Allow skills to view more metadata

I want to see following in request object:

sentences[] // array of sentences
currentSentence  // pointer to current sentence
currentSentenceIndex  // index of the current sentence

contexts[]  // array of current and previous context states
currentContext  // pointer to current state of context
currentContextIndex  // index of the current context

topics[]  // array of topics
currentTopic  // Pointer to current topic
currentTopicIndex  // index of the current topic

Not sure how best these things should be organised.

Move to event driven architecture

This will require massive re-design.

Change architecture to use EventEmitter functionality. This will allow loosely coupled resolvers which then in future can be replaced with custom ones if needed. This will also allow external clients to subscribe to events too.

Wrap default classifier into an abstract implementation

This prepares for fully pluggable classifiers like Watson.

As of now, the following methods need to be exposed from the Classifier interface:

  • getClassifications(text, callback)
  • addDocument(text, topic, callback)
  • train(callback)

Most of these methods are currently synchronous so first of all that will have to change.

It would be a good idea to isolate the Classifier interface into its own package.

Allow hooks for listening and responding to un-resolvable skills

When a skill cannot be resolved, it throws an error. This shouldn't always be the case. It should allow a subscriber to intercept the unresolved skill call and act on it with a response. The listener should also be able to respond with a message and direct botjs to continue onto the next skill resolution.

Support for multiple classifiers

Bot needs to support multiple classifiers to allow more complex classification. After this feature, it should continue to support single classifier.

Add simple tutorial

Need a tutorial that guides people to write a meaningful implementation of a bot. Like a bot that talks about fruits etc.

Allow classifiers to supply extra information to skills

When I use my own classifier, I want to supply extra information to the resolved skill about the classification.

Currently this information is lost.

Maybe retain classification information supplied in some kind of reserved attribute? Currently the two reserved attributes are label and value. Maybe when data is passed in an attribute like meta, it is passed along to the resolving skill?

Types for binding static text responses to topics

This will allow people to have a static responses set for topcis like help, hello etc.

Currently, I'm imagining this to be a wrapper around the skill class, similar to how SingleLineMessage and MultiLineMessage classes work.

Implementation might look like this:

var staticSkill = new StaticResponseSkill('help', 'I can help you with many things like booking an appointment, checking mail etc');
bot.addSkill(staticSkill);

Support for non-English locales

Can this tool be used to build conversations in languages other than English?
If so, what could be some possible limitations?

Bot not selecting right skill

Hi,

Sometimes, bot is not selecting the skill related to the instruction given... So I was wondering if there were some kind of priorities or order when defining skills ?

Thank you for your answer.

Add extractors

Need a basic list of extractors that can extract information from sentences. Primarily this could just be some functions that get executed as a base filter.

Some examples:

  • credit card extractor
  • phone number extractor
  • name extractor
  • sort code extractor

Enable single-sentence query mode

Currently all queries are treated as multi-sentence and hence it expects multiple queries to be passed in. Sometimes to avoid the complexity of writing skills that can handle multi-sentence queries, it makes sense to turn this feature off. I expect this to be a flag in configuration object for the Bot, something like:

var options = {
    query: {mode: 'single'}
};

or something more flat and simpler:

var options = {
    singleQueryMode: true
};

Feature req: Please integrate apipie.ai

Users want access to as much AI as they can get, they dont want to manage 50 accounts, they want the fastest AI they want the cheapest AI, and you can provide all of that for them with this update.

in addition to or in place of integrating with any aggregators - Please integrate APIpie so devs can access them all from one place/subscription and plus it also provides:

-The most affordable, reliable and fastest AI available
-One API to access ~500 Models and growing
-Language, embedding, voice, image, vision and more
-Global AI load balancing, route queries based on price or latency
-Redundancy for major models providing the greatest up time possible
-Global reporting of AI availability, pricing and performance

Its the same API format as openai, just change the domain name and your API key and enjoy a plethora of models without changing any of your code other than how you handle the models list.

This is a win win for everyone, any new AI's from any providers will be automatically integrated into your stack with this one integration. Not to mention all the other advantages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.