-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] triggerAction for Intent does not work as expected #3233
Comments
@zixiangfu I'm not entirely sure of what you're asking for, if I understand correctly you want to be able to plug in multiple recognizers into your bot? You're able to do this using Here's an example of just adding a var QnAConfig = { } // QnaMaker key and knowledge base ID
bot.recognizer(new builder.LuisRecognizer(process.env.LUIS_MODEL))
.recognizer(new cognitiveservices.QnAMakerRecognizer(QnAConfig)); Heading away from this however... For your first code snippet, I'd like to highlight this section: // Define handler/dialog for matched intent
intents.matches('Greeting', '/welcome');
intents.matches('qna', '/faq');
intents.matches('reservation', '/reservation');
intents.matches('weather', '/weather');
intents.onDefault('/confused');
//Associate handler to custom dialog
bot.dialog('/', intents);
bot.dialog('/welcome', dialog.welcome).triggerAction({matches:'Greeting'});
bot.dialog('/faq', dialog.faq).triggerAction({matches:'qna'});
bot.dialog('/weather', dialog.botIntro).triggerAction({matches:'weather'});
bot.dialog('/reservation', dialog.reservation).triggerAction({matches:'reservation'}); The second parameter in This said however, I recommend that you continue with your second method of plugging the recognizers in at the bot level as opposed to at the dialog level as it affords more control when handling intents. Does this clear things up? |
Yes, I removed the |
Thanks for the update @zixiangfu - I'm happy you got it working. 👍 |
System Information (Required)
SDK Language: NODE JS
SDK Version: 3.9.0
Development Environment: LOCALHOST
Issue Description
I have the following code snippet using three recognisers but the triggering of the intent doesn't work for me. Did I pass in the intent wrongly? I tried replacing with regular expression and it works for me. I have included a help dialog that execute when with the regular expression for help and it works. I am using botbuilder version 3.9.0.
Code Example
I tried removing the IntentDialog and used only the LuisRecognizer and it works for me. However, I will like to use more than one recogniser as I will like to use QnAMaker as well. Is there any way to make that work?
The text was updated successfully, but these errors were encountered: