有没有一种方法可以仅遵循Caroussel Selector中的URL? [英] Is there a way to simply follow a URL in the Caroussel Selector?

查看:51
本文介绍了有没有一种方法可以仅遵循Caroussel Selector中的URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试弄清楚如何嵌入Google Actions响应,例如卡旋转木马,在DialogFlow的webhook响应中。

I am trying to figure out how I can embed Google Actions responses, such as the cards carousel, in a webhook response for DialogFlow.

根据文档,结构如下:

"carouselSelect": {
    "items": [
    {
        "optionInfo": {
            "key": "MATH_AND_PRIME",
            "synonyms": [
                "math",
                "math and prime",
                "prime numbers",
                "prime"
            ]
        },
        "title": "Math & prime numbers",
        "description": "42 is an abundant number because the sum of its proper divisors 54 is greater...",
        "image": {
            "url": "http://example.com/math_and_prime.jpg",
            "accessibilityText": "Math & prime numbers"
        }
    }

有没有办法让设备简单单击某个卡片后,是否跟随链接?

Is there a way to let the device simply follow a link when a certain card is clicked?

在文档中,有一段处理所选项目,但这并不能真正回答我的问题。就我而言,我正在显示DialogFlow对话中的卡片,如如何在Dialogflow中将Google Actions响应集成到webhook响应中?,所以我没有遵循这些文档中所述的Google Actions SDK流程。

In the documentation, there is a paragraph Handling selected item, but this does not really answer my question. In my case, I am showing the cards from a DialogFlow conversation as explained in How can I integrate the Google Actions responses in a webhook response in Dialogflow?, so I am not following the Google Actions SDK flow as explained in these docs.

此外,如果我正确理解本段,则将使用某些选定的项来调用后端服务。在我的场景中,我不需要在后端使用此信息,而是希望设备仅遵循URL。

Also as a side note, if I am understanding this paragraph correctly, the backend service is called with a certain selected item. In my scenario, I don't need this information in the backend, I would rather want the device to just follow the URL.

推荐答案

<简而言之-不直接,不。 (更新:是。请参见下文。)

In short - not directly, no. (Update: Yes. See below.)

您在混用术语,这可能会引起一些混乱。 Google上的操作定义了一些具有不同功能的不同GUI组件:

You're mixing terminology, which may be causing some confusion. The Actions on Google defines a few different GUI components which have different capabilities:


  • 用于推进对话的选项可以表示为列出轮播项目。这些都允许图像和一些文本(考虑一两个句子)。选择选项将发送回您的操作,以使用户选择一个继续对话。

  • Options to advance the conversation can be presented as List or Carousel items. Both of these allow an image and some text (think around a sentence or two). The selection option is sent back to your Action with the intention that the user will select one to continue the conversation. It is not meant to be the result of the conversation.

您还可以显示一张 Card ,其中还包含图片和一些文字。但是,与选项不同,您只能显示一张卡片,并且可以包含链接到其他地方的URL。

You can also show a single Card which also contains an image and some text. Unlike the Options, however, you can only display a single card, and it can contain a URL that links elsewhere. Cards are intended to be the result of a conversation.

还有建议筹码,它们是一两个字,意在进行对话。补充上述选项以更改对话的方向。

There are also Suggestion Chips which are a word or two and are intended to supplement the above options to change the direction of the conversation.

最后,有一个链接输出芯片,它是

此时最好的方法是向用户提供可用的选项, ,他们回覆后,直接在卡片上出示带有链接的卡片,或者如果他们想要的话提示他们,并提供一个建议芯片说否并返回对话,或者提供指向目的地的链接芯片

The best you can do at this point is to present the user with the options available and, once they reply, present a card with a link out directly on the card, or prompt them if this is what they wanted and offer a suggestion chip saying "no" that goes back into the conversation or a link out chip to the destination that the card represents.

更新:Google刚刚添加了创建浏览轮播,使您可以创建类似于ac arousel,但只有链接。浏览轮播的定义不同(它是RichResponse的一部分,而不是可能的Intent),但两者看起来非常相似。

Update: Google has just added the ability to create a Browsing Carousel, which allows you to create something that looks like a carousel, but only has links. The Browsing Carousel is defined differently (it is part of a RichResponse rather than a possible Intent), but the two look very similar.

这篇关于有没有一种方法可以仅遵循Caroussel Selector中的URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆