简体   繁体   English

没有触发dialogflow默认回退意图

[英]dialogflow default fallback intent is not triggered

I am trying to build the dialog flow app with v1 API support and in my case, my test app gets crashed or stopped when non-utterance words spoken by the user even though I have a fall back function in my agent, it doesn't get triggered. 我正在尝试使用v1 API支持构建对话框流程应用程序,在我的情况下,即使我的代理中有后备功能,当用户说出非话语单词时,我的测试应用程序也会崩溃或停止被触发。

intentMap.set('Default Fallback Intent', fallback);
agent.handleRequest(intentMap);
function fallback(agent) {
        var conv = agent.conv();
        // conv.ask(`I didn't understand`);
        conv.ask(`I'm sorry, can you try again?`);
        agent.add(conv);
    }

I didnot configured/added any intent on dialog flow intents for Fallback intent except my Welcome Intent. 除了我的“欢迎”意图之外,我没有为“回退”意图配置/添加任何对话流意图的意图。

[Update] Fallback intent configuration on dialogflow [更新]对话流程上的后备意图配置 意向 意向配置

Based on your screen shots, the issue is that you didn't actually create a Fallback Intent. 根据您的屏幕截图,问题在于您实际上并未创建后备意图。 You created an Intent with the "Highest" priority to handle phrases, but with no phrases to match. 您创建了一个具有“最高”优先级的Intent以处理短语,但没有匹配的短语。 So it doesn't match anything. 所以它什么都不匹配。

Fallback Intents are a special Intent that match when nothing else matches for the contexts that are active. 备用意向是一种特殊的意向,当没有其他条件与活动的上下文匹配时,便会匹配。 To create a Fallback intent, from the Intents listing, select the three dots in the upper right corner 要创建后备意图,请从“意图”列表中选择右上角的三个点

在此处输入图片说明

Select "Create Fallback Intent" 选择“创建后备意图”

在此处输入图片说明

You will notice the page is slightly, but just slightly, different. 您会发现页面略有不同,但略有不同。 Set the name for this Fallback Intent (to whatever you want, but it will need to match what you use in your code exactly), turn on webhook fulfillment, and save. 设置此“后备意图”的名称(任意名称,但需要与您在代码中使用的名称完全匹配),打开webhook实现并保存。

在此处输入图片说明

You need to enabled fulfillment for the default fallback intent: 您需要为默认的后备意图启用实现功能:

  1. go to Dialogflow's console ( https://console.dialogflow.com ) 转到Dialogflow的控制台( https://console.dialogflow.com
  2. Go to the default fallback intent 转到默认的后备意图
  3. select the fulfillment section 选择履行部分
  4. Click the switch indicating that the intent should be fulfilled 单击指示应该实现意图的开关 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM