Wingbot plugin for Watson Assistant NLP
npm install wingbot-watsonUse the Watson Assistant NLP in wingbot chatbot
```
npm i -S wingbot-watson
`javascript
const { WatsonNlpModel } = require('wingbot-watson');
const { ai } = require('wingbot');
const watsonNlpModel = new WatsonNlpModel({
username: '
password: '
workspaceId: '
serviceUrl: WatsonNlpModel.SERVICE_URL_FRANKFURT // WatsonNlpModel.SERVICE_URL_LONDON
});
ai.register(watsonNlpModel);
``
-----------------
AI Plugin Model
Kind: global class
* WatsonNlpModel
* [new WatsonNlpModel(options, [log])](#new_WatsonNlpModel_new)
* .SERVICE_URL_DALLAS : string
* .SERVICE_URL_FRANKFURT : string
* .SERVICE_URL_LONDON : string
| Param | Type | Description |
| --- | --- | --- |
| options | object | |
| options.username | string | the API username |
| options.password | string | the API password |
| options.workspaceId | string | workspace ID |
| [options.cacheSize] | number | |
| [options.serviceUrl] | string | model url, default Dallas |
| [log] | Object | logging function |
WatsonNlpModel WatsonNlpModel WatsonNlpModel object| Param | Type |
| --- | --- |
| entity | string |
| value | string |
| score | number |
object| Param | Type |
| --- | --- |
| intent | string |
| score | number |
| [entities] | Array.<Entity> |
object| Param | Type |
| --- | --- |
| entities | Array.<Entity> |
| intents | Array.<Intent> |