您可以在一个triggerAction中使用多个意图吗? [LUIS] [英] Can you use multiple intents in one triggerAction? [LUIS]

查看:58
本文介绍了您可以在一个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)[]}

可以传递正则表达式或命名意图的数组 以多种可能的方式匹配用户的话语.规则 产生最高分(最佳匹配)的得分 目的.

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
 ]});

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆