【发布时间】:2018-10-12 23:26:18
【问题描述】:
如何防止 Luis 在 Bot Framework v4 中触发意图?例如,当向用户询问“你叫什么名字”之类的问题/使用提示时或“你的邮政编码是多少?”
在 v3 中,可以这样做:
var recognizer = new builder.LuisRecognizer(url)
.onEnabled(function (context, callback) {
// LUIS is only ON when there are no tasks pending(e.g. Prompt text)
var enabled = context.dialogStack().length === 0;
callback(null, enabled);
});
(link)
在 v4 中,这是我的识别器:
this.luisRecognizer = new LuisRecognizer({
applicationId: luisConfig.appId,
endpoint: luisConfig.getEndpoint(),
endpointKey: luisConfig.authoringKey
});
我想我需要将其创建为中间件,检查对话状态是否存在,然后禁用/重新启用 Luis...?
【问题讨论】:
-
现在,我只是确保将触发不需要的 Luis 意图的话语分配给“无”意图。
标签: node.js botframework azure-language-understanding