首页 > 解决方案 > 浏览轮播卡不适用于 Dialogflow 中的谷歌助手

问题描述

我正在尝试在 Google 的 Dialogflow 中为 Google Assistant 提供浏览轮播卡(在丰富的响应中)功能。

我只得到简单的响应,如图所示:。

Dialogflow 控制台

粘贴在原始 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"
  }
}

这是模拟器的响应。当触发带有浏览轮播的意图时,机器人将断开连接。

谷歌助手模拟器响应

我是否以正确的方式进行操作?可以做些什么来解决这个问题?

标签: jsongoogle-cloud-platformdialogflow-esactions-on-googledialogflow-es-fulfillment

解决方案


问题是您使用的是 Browse Carousel,但尝试使用 Smart Display 对其进行测试。智能显示器不支持链接,因此它们不支持浏览轮播。

您可以切换到使用 Android 进行测试,您应该能够看到 Browse Carousel。


推荐阅读