I have a dialog as follows to get user name and password from user
bot.dialog('/getUsernamePassword', [
function (session) {
builder.Prompts.text(session, 'Please enter your username');
},
function (session, results) {
session.userData.name = results.response;
builder.Prompts.text(session, 'Please enter your password');
},
function (session, results) {
session.userData.password = results.response;
session.endDialogWithResult(results);
}
]);
after user enter username, my dialog doesn't continue, instead it goes to root dialog and prints "I didn't understand please try again"(default message) Can anyone help me to understand what I am doing wrong here?
my recognizers are configured as follows
var model = 'https://westus.api.cognitive.microsoft.com/luis/..;
var recognizer = new builder.LuisRecognizer(model);
bot.recognizer(recognizer);
// Add regular expression recognizer to bot
var helpRecognizer = new builder.RegExpRecognizer('HelpIntent', /^(help|options)/i);
var cancelRecognizer = new builder.RegExpRecognizer( "CancelIntent", /^(cancel|nevermind)/i);
bot.recognizer(helpRecognizer);
bot.recognizer(cancelRecognizer);
var intents = new builder.IntentDialog({ recognizers: [helpRecognizer,cancelRecognizer,recognizer] });
via Channa Somathilaka
No comments:
Post a Comment