How to close mic for a conversation action?
Asked Answered
G

3

6

Google just rejected my app that I'd built using API AI. Following is the feedback from Google team:

Please either close the mic after app delivers its functionality, or prompt the user to either ask again or cancel.

Does anyone know how to prompt the user/ask again/cancel?

Thanks

Grosvenor answered 5/1, 2017 at 21:51 Comment(0)
W
4

With API.AI, there are a few options:

  1. If you are not using a webhook for the intent, check the End Conversation box in the Actions on Google section at the bottom of the intent page.

  2. If you are using a webhook with the ApiAiAssistant Javascript library, you can use the assistant.tell() method instead of the assistant.ask() method. (See https://developers.google.com/actions/reference/ApiAiAssistant#tell for details.) (Update: These are now conv.add() and conv.close() in version 2 of the library. And API.AI is now called "Dialogflow".)

  3. If you're sending back raw JSON responses from your webhook, you need to set the data.google.expect_user_response property to false to end the conversation. (See https://developers.google.com/actions/reference/webhook-format#response for details about the JSON response.)

Waverley answered 6/1, 2017 at 16:23 Comment(0)
M
0

To end the conversation you can either use the client library "tell" method in fulfillment or you can use the "End conversation" Actions on Google option at the bottom of the intent settings in API.AI.

Merriman answered 5/1, 2017 at 22:27 Comment(3)
Is the client library available in Java?Grosvenor
The client library from Google is currently for Node.js.Merriman
@Grosvenor - there is now a Java client library. See developers.google.com/actions/reference/java/overviewWaverley
S
-3

You can simply say "Set this as the End of Conversation" which is already present below ADD Response Button during your intent building process!!

Slicker answered 22/3, 2018 at 18:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.