Google Assistant通过API.AI进行高级响应

编程入门 行业动态 更新时间:2024-10-09 14:22:05
本文介绍了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进行高级响应

本文发布于:2023-11-28 04:54:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641031.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:高级   Assistant   Google   AI   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!