简体   繁体   English

如果Google操作中没有响应,则提示用户?

[英]Reprompt user if no response in google action?

I am trying to make reprompts work for my action built using the dialogflow SDK. 我试图使使用我使用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). 我有一个意图'answer-question',但是如果用户根本不答复(如果可能,则在一定时间后),我希望触发一个后备意图。

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 我尝试实施本指南中的说明: 重新提示Google操作因此,我为我的答案问题意图创建了一个自定义后备意图,该事件具有一个actions_intent_NO_INPUT事件和一个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. 演讲者(例如Google Home) 将不会产生任何输入。 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. 最后,请确保您的上下文有意义,并记住Intent反映的是用户所说或所做的事情,而不是您答复的内容。

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. 尽管您已经为“无输入”事件指定了输入上下文,这很好,但是您没有指定将其也设置为先前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. 因此,应该为希望用户回答问题的Intent和用户什么都不说的Intent设置相同的输入上下文。

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

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