Botframework No Interruptions from other Intent Dialogs until done with current Intent Dialog

后端 未结 2 734
悲哀的现实
悲哀的现实 2021-01-05 22:53

I\'ve intent A and B using LUIS.ai. In intent A I\'m using builder.Prompts.text to ask user couple questions. However, sometimes depending on the answer it woul

2条回答
  •  一整个雨季
    2021-01-05 23:08

    That's what triggerActions do to you. They can be very handy to keep your dialogs open (http://www.pveller.com/smarter-conversations-part-2-open-dialogs) but in your case they get in the way.

    You can keep your dialogs immune to the global routing system, if you place them under the IntentDialog. If all you do is A and B, then this would be an un-interruptible equivalent of your code:

    const intents = new builder.IntentDialog({
        recognizers: [
            new builder.LuisRecognizer(process.env.LUIS_ENDPOINT)
        ]
    });
    
    intents.matches('A', 'A');
    intents.matches('B', 'B');
    
    bot.dialog('/', intents);
    bot.dialog('A', []);
    bot.dialog('B', []);
    

提交回复
热议问题