LUIS started sending back a JSON that latest Bot Framework 3.4.4 (node.js) does not seem to be equipped to deal with.
I am getting back:
{
entities: [],
intent: [],
query: 'users utterance here',
topScoringIntent: {
intent: 'Recognized Intent',
score: 0.92
}
}
The code in LuisRecognizer.js expects that all intents will be in the intents array. The logic goes to inspect it and find the top scoring one and that one will go onto the top level intent and score of the result object. No code branch is looking for topScoringIntent.
What am I missing?
We're seeing this as well. Looks like the LUIS upgrade broke the LUIS dialog.
Alright. I will just build my own then. It's a very simple HTTP/JSON interface. I am using other recognizers of my own anyway. Or maybe I should submit a PR? Do you guys accept external contributions?
Sent from my iPhone
On Nov 10, 2016, at 6:43 PM, Jason Gross [email protected] wrote:
We're seeing this as well. Looks like the LUIS upgrade broke the LUIS dialog.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I don't appear to have the ability to issue a pull request so here's a patch that worked for me.
diff --git a/Node/core/lib/dialogs/LuisRecognizer.js b/Node/core/lib/dialogs/LuisRecognizer.js
index 1a2b191..2f3ec60 100644
--- a/Node/core/lib/dialogs/LuisRecognizer.js
+++ b/Node/core/lib/dialogs/LuisRecognizer.js
@@ -69,8 +69,13 @@ var LuisRecognizer = (function () {
result = JSON.parse(body);
result.intents = result.intents || [];
result.entities = result.entities || [];
I ended up with a slightly different patch:
if (!err) {
result = JSON.parse(body);
result.intents = result.intents || [];
result.entities = result.entities || [];
// <-- FIX: 1633
if (result.topScoringIntent) {
result.intents.unshift(result.topScoringIntent);
}
// <-- END FIX: 1633
if (result.intents.length == 1 && typeof result.intents[0].score !== 'number') {
result.intents[0].score = 1.0;
}
}
I've just spend 1 hour trying to understand why Luis did not pick what I was saying... Until I look at the source and found that. Is it because Luis change api version to v2?
So you can fix this for now by adding "&verbose=true" to the end of the new URL. We'll have an official patch soon.
Sorry about the break everyone... We knew this was coming but there was some confusion on the when part.
There's a fix checked in which will be in the next release due out very soon.
You can get the fix now by installing the prerelease version of botbuilder:
npm install --save botbuilder@next
Yes this works
Thanks everyone.. saved my day
The update with the patch should be released soon.
@Stevenic or @maxpert was this released?
Just caused me an hour of debugging to find the same results as the guys above. Added the verbose url addition and it's fine now. Thanks for the fix, any idea when the release will be out for this?
Very soon... We're having to sync the release with some other changes so just in a holding pattern on the SDK side of things.
This should be fixed now. Please let me know if it's still an issue.
Most helpful comment
So you can fix this for now by adding "&verbose=true" to the end of the new URL. We'll have an official patch soon.