本文介绍了钩住DialogFlow中的actions_intent_NO_INPUT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试自定义Google Home处理任何用户输入的方式-即如果用户什么也没说却没有回应,那么我想在处理过程中解决这个问题,但是目前,无论我尝试哪种方式组合,Google Home都会始终说对不起,我没有听到,并且然后经过两次尝试,将退出。在她说对不起后,我的满足感得到了回应。但是我想使用比默认值更优美的信息。

I'm trying to customise the way in which Google Home handles no user input - ie. if the user just says nothing and doesn't respond, I want to handle that in my fulfilment, but currently, no matter what combination of things I try, Google Home will always say "Sorry, I didn't hear that", and then after two attempts, will exit. My fulfilment is returning a response after she's said "Sorry".. but i want to use a more graceful message than the default.

我只是不知道该如何改写

I just cannot figure out how to override that message, and get my fulfilment to respond, rather than the seemingly inbuilt response.

我假设正确的动作是 actions_intent_NO_INPUT,但似乎没有可以正常工作。

I'm assuming the correct action is "actions_intent_NO_INPUT", but it doesn't seem to work.

有人能做到这一点吗,还是它是一种内置的安全机制?

Has anyone managed to do this, or is it an inbuilt security mechanism?

推荐答案

我通常会发现需要两个Intent来确保其正确运行。有时我可以让它单独与第一个一起使用,并且文档说您只需要它,但是第二个似乎在第一个(有时)不需要的时候就可以使用。我已将它们设置为在实现中调用相同的操作。

I usually find that it takes two Intents to make sure it works correctly. Sometimes I get it to work with the first one by itself, and the documentation says you should only need that, but the second seems to work when the first one (occasionally) doesn't. I have them set to call the same action in fulfillment.

虽然 actions_intent_NO_INPUT 是正确的,但您需要设置此设置作为Dialogflow中的 Event 。它还对应于名为 actions_intent_no_input 的上下文。在这两者之间,我们可以创建以下Intent:

While actions_intent_NO_INPUT is correct, you need to set this as the Event in Dialogflow. It also corresponds to a context named actions_intent_no_input. Between these two, we can create the following Intents:

第一个是处理事件,设置操作并调用webhook实现的常规Intent:

The first is a regular Intent that handles the event, sets an action, and calls the webhook fulfillment:

第二个是后备意图,仅当设置 actions_intent_no_input 上下文:

The second is a Fallback Intent that only triggers if the actions_intent_no_input context is set:

这篇关于钩住DialogFlow中的actions_intent_NO_INPUT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 21:03