【发布时间】:2017-08-07 10:27:36
【问题描述】:
我正在使用 MS BotBuilder 创建一个机器人语言理解机器人。我有一个对话readProfile,它是在Read Intent 上触发的,该 Intent 是在 LUIS 上训练的。
bot.dialog('readProfile', [
function (session, args) {
var entities = args.intent.entities;
console.log("entities : ", entities)
]).triggerAction({
matches: 'Read'
}).cancelAction('cancelReadProfile', "Ok.", {
matches: /^(cancel|nevermind)/i
});
LUIS 模型经过训练可以识别 Profile 等实体,因此我确实在控制台中获取了实体。
但是,我希望仅当识别的实体是Profile 时才触发对话框。我可以设置一些逻辑仅在 args 中的实体为 Profile 时才起作用,但想知道是否有内置/更优雅的方式来执行此操作。
感谢您的意见。
【问题讨论】:
标签: botframework azure-language-understanding