wit-module
v1.2.0
Published
It is a customized module for wit.ai API.
Downloads
7
Readme
wit-module
It is a customized module for wit.ai API.
Install
$ npm install --save wit-module
Usage
Initializing the wit token to process.env.WIT_TOKEN
var WIT = require("wit-module")
var witModule = new WIT(process.env.WIT_TOKEN);
witModule.converse('something to say?',_sessionId ).then(function(result){
console.log(result);
},function(err){
console.error(err);
})
Document
converse (_str, _sessionId, _postData)
return a promise with response body Read more about converse
WIT.prototype.converse (_str, _sessionId, _postData)
// {
// "confidence": 0.021887092777471962,
// "type": "action",
// "action": "findTheater",
// "entities": {
// "datetime": [
// {
// .....
// }
// ],
// "intent": [
// {
// "confidence": 0.9870533668643489,
// "value": "movie"
// }
// ]
// }
// }