json - 浏览轮播卡不适用于 Dialogflow 中的谷歌助手
问题描述
我正在尝试在 Google 的 Dialogflow 中为 Google Assistant 提供浏览轮播卡(在丰富的响应中)功能。
我只得到简单的响应,如图所示:。
粘贴在原始 API 响应下方(没有浏览轮播卡响应的实例)。
{
"responseId": "ea913388-8753-458c-b033-396512d1af42-e13762d2",
"queryResult": {
"queryText": "show browse carousel",
"parameters": {},
"allRequiredParamsPresent": true,
"fulfillmentMessages": [
{
"platform": "ACTIONS_ON_GOOGLE",
"simpleResponses": {
"simpleResponses": [
{
"textToSpeech": "sample text"
}
]
}
},
{
"platform": "ACTIONS_ON_GOOGLE"
},
{
"text": {
"text": [
""
]
}
}
],
"intent": {
"name": "projects/leafy-winter-268704/agent/intents/bd457567-02c8-4e15-aca7-c32adfcb45f2",
"displayName": "sampleintent"
},
"intentDetectionConfidence": 1,
"languageCode": "en"
}
}
这是模拟器的响应。当触发带有浏览轮播的意图时,机器人将断开连接。
我是否以正确的方式进行操作?可以做些什么来解决这个问题?
解决方案
问题是您使用的是 Browse Carousel,但尝试使用 Smart Display 对其进行测试。智能显示器不支持链接,因此它们不支持浏览轮播。
您可以切换到使用 Android 进行测试,您应该能够看到 Browse Carousel。
推荐阅读
- string-conversion - 将 String 转换为请求的 Nullable 数据类型
- oracle - 验证 Oracle 和 Elasticsearch 之间的数据一致性
- php - 如何从以@开头的 SimpleXMLElement 对象中获取值?
- spring - Spring批处理停止在应用程序启动时运行的ItemReader
- asp.net - Razor 页面中的 POST URL 缺少处理程序查询字符串
- oracle - 我想将数据从 oracle 数据库导出到 csv,并且我在 varchar 列上放置了一个数字过滤器。它抛出 ORA:01722 错误。请建议
- css-transforms - 计算两个重叠元素的变换原点
- python - 超过 79 个字符与评论一致
- node.js - Mongoose:从另一个子文档和人口中引用一个子文档
- json - 如何使用Vue axios无限滚动从json获取数据列表