Reprompt user if no response in google action?

2019-08-01 01:07发布

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条回答
祖国的老花朵
2楼-- · 2019-08-01 01:43

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.

enter image description here

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.

查看更多
登录 后发表回答