1.1.0 • Published 5 years ago

wingbot-watson v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Watson Assistant NLP API integration for Wingbot

Use the Watson Assistant NLP in wingbot chatbot

Installing

npm i -S wingbot-watson

Usage

const { WatsonNlpModel } = require('wingbot-watson');
const { ai } = require('wingbot');

const watsonNlpModel = new WatsonNlpModel({
    username: '<your API username>',
    password: '<your API password>',
    workspaceId: '<your workspace id>',
    serviceUrl: WatsonNlpModel.SERVICE_URL_FRANKFURT // WatsonNlpModel.SERVICE_URL_LONDON
});

ai.register(watsonNlpModel);

API

Classes

Typedefs

WatsonNlpModel

AI Plugin Model

Kind: global class

new WatsonNlpModel(options, log)

ParamTypeDescription
optionsobject
options.usernamestringthe API username
options.passwordstringthe API password
options.workspaceIdstringworkspace ID
options.cacheSizenumber
options.serviceUrlstringmodel url, default Dallas
logObjectlogging function

WatsonNlpModel.SERVICE_URL_DALLAS : string

Kind: static property of WatsonNlpModel

WatsonNlpModel.SERVICE_URL_FRANKFURT : string

Kind: static property of WatsonNlpModel

WatsonNlpModel.SERVICE_URL_LONDON : string

Kind: static property of WatsonNlpModel

Entity : object

Kind: global typedef

ParamType
entitystring
valuestring
scorenumber

Intent : object

Kind: global typedef

ParamType
intentstring
scorenumber
entitiesArray.<Entity>

Result : object

Kind: global typedef

ParamType
entitiesArray.<Entity>
intentsArray.<Intent>