Reputation: 2109
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
Upvotes: 6
Views: 1772
Reputation: 50701
With API.AI, there are a few options:
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.
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".)
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.)
Upvotes: 4
Reputation: 29
You can simply say "Set this as the End of Conversation" which is already present below ADD Response Button during your intent building process!!
Upvotes: -3
Reputation: 4646
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.
Upvotes: 0