Hooking into the actions_intent_NO_INPUT in DialogFlow

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 19:45:43

问题


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.

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?


回答1:


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.

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:

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

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




回答2:


No input intents are only available for speaker surfaces currently. For devices with screens (say, smartphones), the mic is just closed after a while. This can be verified by hovering over to the "no input" icon in the actions console. Guess you are testing it for the mobile devices and hence aren't able to test it. In case, your action works for the speaker surface too, just try testing your code for the same and you should be good to go!



来源:https://stackoverflow.com/questions/49395582/hooking-into-the-actions-intent-no-input-in-dialogflow

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