当我们使用 MS BotFramework 在我们的机器人中使用 LUIS 识别器时,我们如何处理 Action.submit?
var recognizer = new builder.LuisRecognizer(config.LUIS_MODEL_URL);
bot.recognizer(recognizer);
bot.dialog('toolAccess', [
function (session,args,next) {
const msg = new builder.Message(session)
.addAttachment({
//adaptive card body here with Action.submit buttons...
});
session.send(msg);
}
]).triggerAction({ matches : 'toolAccess'});
//toolAccess is an intent in my LUIS app.
我对自适应卡的操作是:
"actions": [
{
"type": "Action.Submit",
"data": {
"type": "okProfileSelection"
},
"title": "OK"
},
{
"type": "Action.Submit",
"data": {
"type": "cancelProfileSelection"
},
"title": "Cancel"
}
]
所以问题是我如何处理这些确定和取消按钮?我应该添加另一个对话框吗?如果是这样, triggerAction 应该是什么?