evilai / nbp-adapter-wit

Wit.ai adapter for Node.js Bot Platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wit.ai adapter

This is a Wit.ai adapter for Node.js Bot Platform. It can get intents and entities from your Wit.ai application.

import witAdapterFactory from 'nbp-adapter-wit';
const wit = witAdapterFactory({
    token: 'your-wit-app-token',
    version: 'api-version',
    logger // instance of your logging tool
});

const result = yield wit.send('Your sentence here');

Please, look at usage example.

Tunneling

Check tunneling.js. To bind context of all client's function we need to perform tunneling on each request, so inside skills you can do wit.send('Some text) without specifying application tokens.

Look at router-builder.js as an example.

About

Wit.ai adapter for Node.js Bot Platform


Languages

Language:JavaScript 100.0%