本文介绍了Google Assistant通过API.AI进行高级响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经有了一个网络挂钩,并且我正在使用它来更改助理答案。 但是我不知道如何发送建议卡或链接,因为您可以从API.AIWeb GUI(从"添加内容"按钮)发送它们。
我是否应以data名称将它们作为JSON object发送。
API.AI webhook documentation
推荐答案API.AI实现WebHook调用的响应的JSON体的一般格式如下,该调用将包括一个简单响应的Action on Google Rich Response和一张卡片。如果要使用列表或旋转木马,文档为here:
{ "speech": "This is a API.AI default speech response", "displayText": "This is a API.AI default display text response", "data": { "google": { "expectUserResponse": true, "isSsml": false, "noInputPrompts": [], "richResponse": { "items": [ { "simpleResponse": { "textToSpeech": "This is a simple speech response for Actions on Google.", "displayText": "This is a simple display text response for Action on Google." } }, { "basicCard": { "title": "Title: this is a title", "subtitle": "This is a subtitle", "formattedText": "This is a basic card. Text in a basic card can include "quotes" and most other unicode characters including emoji更多推荐
Google Assistant通过API.AI进行高级响应
发布评论