您可以在一个 triggerAction 中使用多个意图吗? [路易斯]

Can you use multiple intents in one triggerAction? [LUIS]

我有一个 QnA 机器人,它应该为几个意图工作,我想为 None 意图触发它,问候,因为我有一些独特的回应,IT 帮助,因为这是主要目的QnA 机器人。我是否必须复制粘贴我的整个对话框并仅更改意图名称,或者我是否可以为 matches 方法列出多个意图?

  bot.dialog('QnABotRequest', function (session, args) {
       //Code
    }).triggerAction({
        matches: 'Greeting' | 'None' | 'IT Help' //Maybe something like this ?
    });

https://docs.botframework.com/en-us/node/builder/chat-reference/modules/_botbuilder_d_.html#matchtype 定义它的地方说:

{(RegExp|string)[]}

An array of either regular expressions or named intents can be passed to match the users utterance in a number of possible ways. The rule generating the highest score (best match) will be used for scoring purposes.

使用方法是:

.triggerAction({
    matches: [/greeting/i, /none/i, /^it help/i]
 )}

.triggerAction({ matches: [
    /(roll|role|throw|shoot).*(dice|die|dye|bones)/i,
    /new game/i
 ]});

如果您使用的是 azure,那么您可以尝试以下操作

bot.dialog('QnABotRequest', function (session, args) {
       //Code
    }).triggerAction({
        matches: ['Greeting', 'None', 'IT Help'],
    })