0

我正在尝试创建一个机器人并将其部署到不同的平台上,但是当我在聊天机器人的轮播中返回图像时,Skype 不会呈现它们,而 Facebook 甚至在 Gupshup 提供的 Web 小部件上也是如此。

如果你想知道我使用的聊天机器人平台是Gupshup和 api.ai 连接到 nlp ,你知道我遇到的问题吗?

我尝试了不同的获取图像的方法。首先,我是从我正在为其制作聊天机器人的网站获得的,然后我尝试使用谷歌缩短网址,最后我尝试将图像上传到谷歌驱动器上。图像格式是 jpg,这可能是问题吗?

http://imgur.com/a/19aG3

4

1 回答 1

2

[更新:2017 年 7 月 5 日] - Skype 问题现已解决。适用于 Facebook Messenger 的轮播代码也适用于 Skype。

Skype 上轮播的 JSON 示例:

{
"type": "catalogue",
"msgid": "cat_212",
"items": [{
        "title": "White T Shirt",
        "subtitle": "Soft cotton t-shirt \nXs, S, M, L \n$10",
        "imgurl": "https://pixel.nymag.com/imgs/fashion/daily/2016/06/02/t-shirt/everlane.w710.h473.2x.jpg",
        "options": [{
                "type": "url",
                "title": "View Details",
                "url": "https://pixel.nymag.com/imgs/fashion/daily/2016/06/02/t-shirt/everlane.w710.h473.2x.jpg"
            },
            {
                "type": "text",
                "title": "Buy"
            }

        ]
    },
    {
        "title": "Grey T Shirt",
        "subtitle": "Soft cotton t-shirt \nXs, S, M, L \n$12",
        "imgurl": "https://cdn.shopify.com/s/files/1/0407/0829/products/Grey_t-shirt_front_1024x1024.jpg?v=1466588290",
        "options": [{
                "type": "url",
                "title": "View Details",
                "url": "https://cdn.shopify.com/s/files/1/0407/0829/products/Grey_t-shirt_front_1024x1024.jpg?v=1466588290"
            },
            {
                "type": "text",
                "title": "Buy"
            }
        ]
    }
]}

结果: 在此处输入图像描述

没有为 Skype 上的轮播加载图像,因为 Microsoft 框架最近发生了一些变化,这些变化尚未整合到 Gupshup 的机器人平台中。尽管下周我们 Gupshup 将修复程序投入生产后,您应该能够看到这些图像的加载。无需从您的终端更改代码,因为轮播的相同代码可在支持的平台上运行。

一旦修复程序投入生产,我将更新此答案。

PS:我为 Gupshup 工作。

于 2017-06-30T08:05:15.287 回答