【问题标题】:Multiple response in action on google dialogflow谷歌对话流上的多重响应
【发布时间】:2018-02-10 04:24:24
【问题描述】:

如何使用 dialogflow 在 google 控制台上获得多个响应? 我在谷歌控制台上模拟了操作,但只显示了两个响应 没有显示第三个响应的地方

这是我的 json 响应

{
    "source": "webhook", 
    "data": {
        "google": {
            "is_ssml": true, 
            "permissions_request": null, 
            "expect_user_response": true
        }
    }, 
    "messages": [
        {
            "type": 0, 
            "speech": "peter Got around 28 marks in maths. which is ranked 1 among 3 candidate in class 1"
        }, 
        {
            "textToSpeech": "peter Got around 28 marks in maths. which is ranked 1 among 3 candidate in class 1", 
            "platform": "google", 
            "displayText": "peter Got around 28 marks in maths. which is ranked 1 among 3 candidate in class 1", 
            "type": "simple_response"
        }, 
        {
            "textToSpeech": "Working", 
            "platform": "google", 
            "displayText": "Working", 
            "type": "simple_response"
        }, 
        {
            "textToSpeech": "Working 2", 
            "platform": "google", 
            "displayText": "Working 2", 
            "type": "simple_response"
        }
    ]
}

这是我的控制台输出

非常感谢任何有关此的帮助

谢谢

问候赛义夫

【问题讨论】:

    标签: actions-on-google dialogflow-es google-assistant-sdk


    【解决方案1】:

    只接受两个简单的响应作为响应。如果您想要更多内容,则需要将您的文本合并到两个响应之一中。

    【讨论】:

    • 感谢您的回复,您能告诉我如何设置换行和粗体等文本的格式
    • 对于简单的响应,您应该能够添加换行符 (/n)。粗体等丰富的格式仅适用于卡片和其他 GUI。
    【解决方案2】:

    正如您在AoG Responses docs 上看到的,它被指定为要求:

    每回合最多 2 个聊天气泡

    因此您的第三个气泡不会按照 Google 的预期显示。

    正如尼克先前的回答所建议的那样,您需要合并文本并将所有内容包装在 2 个气泡中。在一个简单的响应中,您可以通过在需要的地方添加 \n 来换行。

    但是,在 Basic Card 中,您可以访问有限的降价子集,如我提供的文档链接中所述,如下所示:

    New line with a double space

    **bold**

    *italics*

    【讨论】:

      【解决方案3】:

      丰富的响应具有以下要求和您可以配置的可选属性:

      1. 在具有 actions.capability.SCREEN_OUTPUT 的表面上受支持 能力。
      2. 富响应中的第一项必须是简​​单响应。
      3. 最多两个简单的响应。
      4. 最多一张基本卡或结构化响应。
      5. 最多8个建议芯片。 (您也可以添加超过 8 个,但您会收到警告而不是错误。)
      6. FinalResponse 中不允许使用建议筹码
      7. 目前无法从智能显示器链接到 Web 支持。

      【讨论】:

        猜你喜欢
        • 2020-04-03
        • 2018-11-27
        • 1970-01-01
        • 2021-12-28
        • 1970-01-01
        • 2019-03-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多