Reprompt user if no response in google action?

断了今生、忘了曾经 提交于 2019-12-14 02:21:52

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/52605242/reprompt-user-if-no-response-in-google-action

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!