0.1.0 • Published 6 years ago
wingbot-trasknlp v0.1.0
Trask NLP API integration for Wingbot
Use the Trask NLP in wingbot chatbot
Installing
npm i -S wingbot-trasknlpUsage
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> |
0.1.0
6 years ago