Jovkhar Issayev
Jovkhar Issayev

Reputation: 11

End Google Assistant Conversation

I have an application that communicates with Google Assistant via Webhook. When a user asks for something, my app sends the question to AI (Watson IBM). After it gets the response, I want to show it to the user and end the conversation. So I send a text from Watson and nextSecene =actions.scene.END_CONVERSATION. But Google Assistant just ends the conversation without showing the response to user. So is it possible to show the response message to the user and than end the conversation?

Example of my app JSON format response:

GAResponse(prompt=GAPrompt(override=false, firstSimple=GAFirstSimple(speech=<speak>You are very smart bro,y<break time="100ms"/> and i love monsters like you.</speak>, text=You are very smart bro and i love monsters like you), content=null, lastSimple=null, link=null, canvas=null, orderUpdate=null), scene=GAScene(name=null, slotFillingStatus=null, slots=null, next=actions.scene.END_CONVERSATION) ...)

Upvotes: 1

Views: 167

Answers (1)

Jessica Earley-Cha
Jessica Earley-Cha

Reputation: 86

Yes this is possible.

I'm not sure which library your using to generate your response json, but below is an example that provides the speech and text data and ends the conversation. You can learn more on the fulfillment (aka webhook) on the reference documentation

{
  "session": {
    "id": "example_session_id",
    "params": {}
  },
  "prompt": {
    "override": false,
    "firstSimple": {
      "speech": "<speak>You are very smart bro, <break time="100ms"/> and i love monsters like you.</speak>",
      "text": "You are very smart bro and i love monsters like you"
    }
  },
  "scene": {
    "name": "SceneName",
    "slots": {},
    "next": {
      "name": "actions.scene.END_CONVERSATION"
    }
  }
}

If you're interested in using Assistant Conversation libraray, check out this link to see an example response

Upvotes: 1

Related Questions