You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
There has been an update that fixes it. But I think the package is not update in npm. I installed it using npm today and I get the older version where wit.hear method handles for the old API response.
The code on git however is updated and works as it should.
Update:
This is how I got it to work. Taking a look at the message returned from the API, I saw it was kind of weird. This is a very hacky fix but this is giving me the expected behavior.
middleware.hears = function(tests, message) {
//console.log(message);
obj = message.intents[0].entities
var count = Object.keys(obj).length;
if (count != 0) {
for (var i = 0; i < message.intents[0].entities.intent.length; i++) {
for (var t = 0; t < tests.length; t++) {
if (message.intents[0].entities.intent[0].value == tests[t] &&
message.intents[0].entities.intent[0].confidence >= config.minimum_confidence) {
return true;
}
}
}
}
return false;
};
On 2016, May 11th, the /message API was updated to reflect the new Bot Engine model: intent are now entities. We updated the SDK to the latest version: 20160516. You can target a specific version by passing the apiVersion parameter when creating the Wit object.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Getting "WARNING":"DEPRECATED" in the returned payload. I can see my intent in the
intent
array, but not on the top object underoutcomes
.The text was updated successfully, but these errors were encountered: