[英]End Google Assistant Conversation
我有一个通过 Webhook 与 Google Assistant 通信的应用程序。 当用户提出要求时,我的应用程序会将问题发送给 AI (Watson IBM)。 得到响应后,我想将其显示给用户并结束对话。 所以我从 Watson 和nextSecene =actions.scene.END_CONVERSATION
发送了一条文本。 但 Google Assistant 只是结束了对话,没有向用户显示回复。 那么是否可以向用户显示响应消息而不是结束对话?
我的应用 JSON 格式响应示例:
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) ...)
是的,这是可能的。
我不确定您使用哪个库来生成响应 json,但下面是一个提供语音和文本数据并结束对话的示例。 您可以在参考文档中了解有关实现(又名 webhook)的更多信息
{
"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"
}
}
}
如果您有兴趣使用 Assistant Conversation 库,请查看此链接以查看示例响应
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.