0.1.0 • Published 5 years ago

wingbot-trasknlp v0.1.0

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

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)

ParamTypeDescription
optionsObject
options.subscribtionKeystringthe subscribtion key header
options.apiKeystringthe api key
options.modelstringmodel name (part of the url)
options.cacheSizenumber
options.serviceUrlstring
logObjectlogging function

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>