问题描述
我的Microsoft机器人程序框架中有一个瀑布对话框,向用户询问一些问题,例如地理,公司等.我还有另一个对话框,当LUIS意图与GetCompanyNews匹配时会触发该对话框.
I have a waterfall dialog in my Microsoft bot framework which asks the user several questions like geo, company, etc. I have another dialog which gets triggered when the LUIS intent matches GetCompanyNews.
我在模拟器中观察到,当用户在瀑布对话中输入公司名称时,它将触发另一个对话框,并且瀑布对话框将被替换.
I observed in the emulator that when the user types company name during the waterfall conversation, it triggers the other dialog and the waterfall dialog gets replaced.
这是预期的行为吗?如果是,那么有什么方法可以防止中断瀑布对话框?
Is this the expected behavior? If yes, then is there any way to prevent interruptions to the waterfall dialog?
推荐答案
在GitHub上有类似的情形,位于 https://github.com/Microsoft/BotBuilder/issues/2670 .从中我们可以发现,根本原因应该是:
There is a similar scenario at GitHub at https://github.com/Microsoft/BotBuilder/issues/2670. From which we can found that, the root cause should be:
而且我们还有一个解决方案,需要bot SDK版本大于3.8
,
And also we have a solution which need the bot SDK version is greater then 3.8
,
var recognizer = new builder.LuisRecognizer('<model>').onEnabled(function (context, callback) {
var enabled = context.dialogStack().length == 0;
callback(null, enabled);
});
这篇关于避免在瀑布对话框期间中断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!