Skip to content

This is a Node.js Bot Platform skills cluster with ability to build part of the global decision tree and run tree traverse.

Notifications You must be signed in to change notification settings

evilai/nbp-skills-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skills Cluster

This is a Skills Cluster for Node.js Bot Platform. Abilities of this Cluster:

  • plug different Skills;
  • build part of decision tree (a queue) of skills;
  • run traverse.

Skill

You can define a skill as an object with name and lambda fields:

const skill = {
    name: 'skillName',
    lambda: function(context) {
        return Promise.resolve(context);
    }
};

Skill always should return a Promise, which resolve a context. Context is usually consist of services, that current bot used, and rules:

const skillLambda = function({ bot, rules }) {
   // The list of services is dependent on route-builder.js in Node.js Bot Platform repository 
   // bot.storage
   // bot.memcached
   // bot.messenger
   return Promise.resolve({ bot, rules });
}

Please, look at usage example.

About

This is a Node.js Bot Platform skills cluster with ability to build part of the global decision tree and run tree traverse.

Resources

Stars

Watchers

Forks

Packages

No packages published