carouselSelect in V2 - 一切都像在doc中但它不起作用

时间:2018-03-10 13:31:03

标签: dialogflow

我阅读了一份文档并看到了轮播选择(API V2)的格式

"fulfillmentMessages": [
  {
    "platform": "FACEBOOK",
    "carouselSelect": {
      "items": [
        {
          "info": {
            "key": "Pologne"
          },
          "title": "Varsovie",
          "description": "Prices are starting from 204",
          "image": {
            "imageUri": "https://bucketeer-2aea38ff-6103-4b82-a7e2-760c5feac625.s3.amazonaws.com/public/url_z/PL-sky/WARS-sky/1.jpg"
          }
        },
        {
          "info": {
            "key": "Turquie"
          },
          "title": "Istanbul",
          "description": "Prices are starting from 229",
          "image": {
            "imageUri": "https://bucketeer-2aea38ff-6103-4b82-a7e2-760c5feac625.s3.amazonaws.com/public/url_z/TR-sky/ISTA-sky/1.jpg"
          }
        }
      ]
    }
  },
  {
    "platform": "SLACK",
    "carouselSelect": {
      "items": [
        {
          "info": {
            "key": "Pologne"
          },
          "title": "Varsovie",
          "description": "Prices are starting from 204",
          "image": {
            "imageUri": "https://bucketeer-2aea38ff-6103-4b82-a7e2-760c5feac625.s3.amazonaws.com/public/url_z/PL-sky/WARS-sky/1.jpg"
          }
        },
        {
          "info": {
            "key": "Turquie"
          },
          "title": "Istanbul",
          "description": "Prices are starting from 229",
          "image": {
            "imageUri": "https://bucketeer-2aea38ff-6103-4b82-a7e2-760c5feac625.s3.amazonaws.com/public/url_z/TR-sky/ISTA-sky/1.jpg"
          }
        }
      ]
    }
  }
],

但不幸的是,它不起作用。你有什么想法吗?当我使用来自doc的Card对象工作正常。此外,如果我添加fulfillmentText,机器人会显示文本

1 个答案:

答案 0 :(得分:0)

您可以在docs中阅读有关Dialogflow支持哪些类型的丰富消息的更多信息。 Dialogflow支持文本,卡片,图像,建议筹码(快速答复)和有效载荷(特定于平台的响应)。

有关自定义有效负载的内容,请参阅目标平台文档(Google助手,Slack,Facebook Messenger等)

但是,Google上的操作支持更多rich responses,例如轮播等。