如果Google操作中没有响应,则提示用户? [英] Reprompt user if no response in google action?

查看:109
本文介绍了如果Google操作中没有响应,则提示用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试使使用对话框流程SDK构建的动作的提示起作用。



我有一个回答问题的意图,但是我想要一个后备选项如果用户根本不答复(如果可能,则在一定时间后)触发。



我尝试执行本指南中的说明:



回复。



尽管您已经为无输入事件指定了输入上下文,但这很好,但是您并未指定也将其设置为输出前一个Intent的上下文。根据您的描述,它不应设置在答案问题中,因为您不希望用户在回答问题后 不输入任何内容,因此该<而不是回答问题。因此,应为希望用户回答问题的Intent和用户什么都不说的Intent设置相同的输入上下文。


I am trying to make reprompts work for my action built using the dialogflow SDK.

I have an intent 'answer-question' , however I would like a fallback intent to trigger if the user does not reply atall (after a certain unit of time if possible).

I have tried to implement the instructions in this guide: reprompts google action So I created a custom fallback intent to my answer-question intent, which has an event of actions_intent_NO_INPUT and a context of answer-question-followup

However when testing the intent , it will wait indefinitely for a user response, and never trigger this custom fallback intent.

解决方案

The "no input" scenario only happens on some devices.

Speakers (such as the Google Home) will generate a no input. You can't control the time it will wait, however.

Mobile devices will not generate a "no input" - it will just turn the microphone off and the user will need to press the microphone icon again to open the mic again.

When testing using the simulator, it will not generate "no input" automatically, but you can generate a "no input" event using the button next to the text input area. Make sure you're in a supported device type (such as the speaker) and press the icon to indicate you're testing a "no input" event.

Finally, make sure your contexts make sense and remember that Intents reflect what a user says or does - not what you're replying with.

Although you've specified an Input Context for the "no input" event, which is good, you didn't specify that you've also set that as an Output Context for the previous Intent. Given your description, it shouldn't be set in 'answer-question' because you're not expecting no-input after the user answers the question, it would be instead of answering the question. So the same Input Context should be set for the Intents where you expect the user to answer the question and the Intent where the user says nothing.

这篇关于如果Google操作中没有响应,则提示用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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