Multiple LUIS models requires input to be entered twice
I have been working on a bot with multiple luis models. I have used Node.js for this. So everytime I enter an utterance, I get the response as classified by LUIS as long as I am within the same intent's waterfall. But as soon as the waterfall ends, the next time I enter a query, I do not get a response but if I reenter the same query, I get a response.
For example:- I have two models A and B. Model A handles food requests, Model B handles clothing.
Me: Give me some food Bot: Continental / Italian/ Indian? Me: Italian Bot: Hungry for some pizza? Me: Sure! Bot: Sending it on your way. Me: I also need some new shoes. No response from bot Me: I also need some new shoes. Bot: What size do you wear?
Am I missing something when doing an intents.matches?
I have the same issue in c# between luis root dialog and child prompt dialogs.
You're using a single IntentDialog with two models right? If that's the case then it's most likely something to do with how you finish up the task. Can you show me one of your waterfalls? I'm curious what you do when you send "Sending it on your way."
Yes, I'm using a single IntentDialog with two models. Here is a snippet for the waterfall.
intents.matches('SaveMoney', [
var savings = builder.EntityRecognizer.findAllEntities(args.entities, 'builtin.number');
var amount = session.dialogData.amount = {};
function(session, args, next) {
if (savings.length == 0) {
builder.Prompts.text(session, 'How much money would you like to save?');
} else {
if (savings.length > 1) {
builder.Prompts.number(session, "Please enter a single amount. If you enter more than one amount, the first amount will be accepted");
} else {
amount.savings = savings[0].entity;
next();
}
}
},
function(session, results)
{
var amount = session.dialogData.amount;
var amountSaved = 0;
if (results.response) {
amountSaved = results.response;
amount.savings = results.response;
} else if (amount.savings) {
amountSaved = amount.savings;
}
builder.Prompts.text(session, 'Good choice to save ' + amountSaved);
}]);
@Stevenic or @maxpert can you help?
Sorry for the delay... You're calling Prompts.text() in your last waterfall step which is going to wait for the user to respond. You should call session.endDialog() with your message instead.
I'm having similar issue c#, user: text1 Bot: (One Intent identifies and returns buttons in HeroCard) Button1/Button2/Button3 User: (selects/enter other value instead of selecting/entering above buttons value) text2 Bot: (displaying) text2 (But text2 should be identified by LuisDialog intent) DisplayTraining.txt PFA async DisplayTraining method which accepts Buttons value. Based on button value it returns some values and again displays those in HeroCard. In above its going to else block where no items returns based on text2. In this else block we need to post text2 as new post which should be identified by LuisDialog intents instead of simply displaying text2 from bot.
Thanks in advance, Rasheed
using below line helped me to re-dispatch the activity on the same LuisDialog, await MessageReceived(context, Awaitable.FromItem(context.Activity.AsMessageActivity()));
Hey @baishali-ghosh I think the code snippet you pasted has syntax error. Also is it still happening?
Closing this but feel free to comment.