本文介绍了您可以在一个triggerAction中使用多个意图吗? [LUIS]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个QnA机器人,该机器人应可用于多种意图,并且我想针对无意图",问候"(因为我有一些独特的响应)和IT帮助来触发它,因为这是QnA机器人的主要目的.我是否需要复制粘贴整个对话框并仅更改意图名称,还是可以为matchs方法列出多个意图?

I have a QnA bot that should work for a couple of intents and I want to trigger it for None intent, Greeting because I have some unique responses, and IT help because that's the main purpose of the QnA bot. Do I have to copy paste my entire dialog and just change the intent name or can I list multiple intents for the matches method?

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

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

{(RegExp|string)[]}

推荐答案

使用方法是:

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

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

这篇关于您可以在一个triggerAction中使用多个意图吗? [LUIS]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 00:33