Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to close mic for a conversation action?

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

like image 583
Sai Avatar asked Jan 05 '17 21:01

Sai


1 Answers

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.)

like image 137
Prisoner Avatar answered Nov 18 '22 02:11

Prisoner