I'm using a TextPrompt in a waterfall dialog (Microsoft Bot Framework v4, node.js) to ask a user a question. I see in the emulator that Luis Trace is returning a recognizerResult which contains the top-scoring intent, but how do I access it and act upon it?
Example steps:
async askAQuestionStep(step) {
return await step.prompt(MYQUESTION_PROMPT, {
prompt: 'How are you feeling?'
});
}
async getAnAnswerStep(step) {
if (step.result) {
if (topScoringIntent === 'Good') {
await step.context.sendActivity("Good to hear.");
} else {
return await step.next();
}
}
Need to figure out how to actually access "topScoringIntent." The example show how to do this, but I'm getting this error:
[onTurnError]: TypeError: Cannot read property 'recognize' of undefined
I'm not calling this from bot.js, but from its own dialog/file.