actions-on-google / assistant-conversation-nodejs

A developer friendly way to fulfill Actions SDK handlers for the Google Assistant
https://actions-on-google.github.io/assistant-conversation-nodejs
Apache License 2.0
104 stars 27 forks source link

How to off the mic after conv.add() #13

Open ashokkumar88 opened 4 years ago

ashokkumar88 commented 4 years ago

My project rejected because the mic was open after conversion. How to off the mic after conv.add(). The conv.close() function is not available.

taycaldwell commented 4 years ago

You can set the transitioning scene to end the conversation.

If you want to do this from the webhook you can do:

conv.scene.next = { name: 'actions.scene.END_CONVERSATION' };
ashokkumar88 commented 4 years ago

But I do not want to end the conversation only need to close the mic. In the documentation there is conv.close() function but it is not available to use. https://actions-on-google.github.io/actions-on-google-nodejs/classes/conversation.conversation-1.html

Fleker commented 4 years ago

conv.close() would also end the conversation. The platform expectation is to create a single conversation of back-and-forth until the conversation is finished.

afirstenberg commented 3 years ago

The problem is not that you need to close the mic. The issue is that the review team has determined there are places in your conversation where your agent says something, but doesn't make it clear that the user needs to reply. Your action has replied, the mic is open for the user to say something, but it isn't clear that they need to say anything.

The easiest solution to this is to make sure that every time you expect the user to reply, make sure you prompt them. This is usually done with a question, such as "what would you like to do now?"

You can include this as a second "simple" response with code such as

conv.add("Here is the info you need.");
conv.add("What would you like to do now?");
ashokkumar88 commented 3 years ago

@afirstenberg Thanks. It is approved.