botbuilder-wit
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -14,11 +14,4 @@ "use strict"; | ||
function WitRecognizer(accessToken) { | ||
this._witClient = new node_wit_1.Wit({ accessToken: accessToken }); | ||
this.witClient = new node_wit_1.Wit({ accessToken: accessToken }); | ||
} | ||
Object.defineProperty(WitRecognizer.prototype, "witClient", { | ||
get: function () { | ||
return this._witClient; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
WitRecognizer.prototype.recognize = function (context, done) { | ||
@@ -28,6 +21,5 @@ var result = { score: 0.0, intent: null }; | ||
var utterance = context.message.text; | ||
this._witClient.message(utterance) | ||
this.witClient.message(utterance) | ||
.then(function (response) { | ||
if (response.error) { | ||
console.log(response); | ||
return done(new Error(response.error), null); | ||
@@ -34,0 +26,0 @@ } |
{ | ||
"name": "botbuilder-wit", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Provides Wit.ai NLP integration for the Microsoft Bot Builder SDK", | ||
@@ -9,3 +9,3 @@ "main": "lib/WitRecognizer.js", | ||
"test": "./node_modules/.bin/_mocha", | ||
"test-cov": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly" | ||
"coverage": "istanbul cover ./node_modules/.bin/_mocha" | ||
}, | ||
@@ -17,8 +17,6 @@ "repository": { | ||
"keywords": [ | ||
"Microsoft Bot Framework", | ||
"botbuilder", | ||
"chatbots", | ||
"bots", | ||
"witai", | ||
"wit", | ||
"wit.ai", | ||
"nlp" | ||
@@ -34,5 +32,4 @@ ], | ||
"devDependencies": { | ||
"@types/node": "^6.0.55", | ||
"@types/node": "^6.0.59", | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.15", | ||
"istanbul": "^0.4.5", | ||
@@ -39,0 +36,0 @@ "mocha": "^3.2.0", |
@@ -1,2 +0,2 @@ | ||
# botbuilder-wit | ||
# botbuilder-wit [](https://badge.fury.io/js/botbuilder-wit) | ||
Node.js module that provides [Wit.ai](https://wit.ai) NLP integration for the [Microsoft Bot Builder SDK](https://dev.botframework.com/). | ||
@@ -9,3 +9,3 @@ | ||
## Usage | ||
This package does **not** work with Wit.ai's *Story* feature. This is by design. That doesn't mean you can't use it entirely, just not in combination with the IntentDialog that uses the WitRecognizer. | ||
This package does **not** work with Wit.ai's *Story* feature. It was designed to be used in conjunction with the IntentDialog class. | ||
``` | ||
@@ -12,0 +12,0 @@ const { IntentDialog } = require('botbuilder'); |
Sorry, the diff of this file is not supported yet
6
8
9955
81