wingbot-trasknlp
v0.1.0
Published
Wingbot plugin for Trask NLP
Downloads
3
Maintainers
Readme
Trask NLP API integration for Wingbot
Use the Trask NLP in wingbot chatbot
Installing
npm i -S wingbot-trasknlp
Usage
const { TraskNlpModel } = require('wingbot-trasknlp');
const { ai } = require('wingbot');
const traskNlpModel = new TraskNlpModel({
model: 'name-of-your-model',
subscribtionKey: '<your subscribtion key>',
apiKey: '<your api key>'
});
ai.register(traskNlpModel);
API
Classes
Typedefs
TraskNlpModel
AI Plugin Model
Kind: global class
new TraskNlpModel(options, [log])
| Param | Type | Description | | --- | --- | --- | | options | Object | | | options.subscribtionKey | string | the subscribtion key header | | options.apiKey | string | the api key | | options.model | string | model name (part of the url) | | [options.cacheSize] | number | | | [options.serviceUrl] | string | | | [log] | Object | logging function |
Entity : Object
Kind: global typedef
| Param | Type | | --- | --- | | entity | string | | value | string | | score | number |
Intent : Object
Kind: global typedef
| Param | Type | | --- | --- | | intent | string | | score | number | | [entities] | Array.<Entity> |
Result : Object
Kind: global typedef
| Param | Type | | --- | --- | | entities | Array.<Entity> | | intents | Array.<Intent> |