Watson Assistant NLP API integration for Wingbot
Use the Watson Assistant NLP in wingbot chatbot
Installing
npm i -S wingbot-watson
Usage
const WatsonNlpModel = ;const ai = ; const watsonNlpModel = username: '<your API username>' password: '<your API password>' workspaceId: '<your workspace id>' serviceUrl: WatsonNlpModelSERVICE_URL_FRANKFURT // WatsonNlpModel.SERVICE_URL_LONDON; ai;
API
Classes
- WatsonNlpModel
AI Plugin Model
Typedefs
WatsonNlpModel
AI Plugin Model
Kind: global class
- WatsonNlpModel
- new WatsonNlpModel(options, [log])
- .SERVICE_URL_DALLAS :
string
- .SERVICE_URL_FRANKFURT :
string
- .SERVICE_URL_LONDON :
string
new WatsonNlpModel(options, [log])
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 |
string
WatsonNlpModel.SERVICE_URL_DALLAS : Kind: static property of WatsonNlpModel
string
WatsonNlpModel.SERVICE_URL_FRANKFURT : Kind: static property of WatsonNlpModel
string
WatsonNlpModel.SERVICE_URL_LONDON : Kind: static property of WatsonNlpModel
object
Entity : Kind: global typedef
Param | Type |
---|---|
entity | string |
value | string |
score | number |
object
Intent : Kind: global typedef
Param | Type |
---|---|
intent | string |
score | number |
[entities] | Array.<Entity> |
object
Result : Kind: global typedef
Param | Type |
---|---|
entities | Array.<Entity> |
intents | Array.<Intent> |