Dialogflow es 在Dialogflow中显示列表响应后,我们是否可以触发简单响应?

Dialogflow es 在Dialogflow中显示列表响应后,我们是否可以触发简单响应?,dialogflow-es,actions-on-google,dialogflow-es-fulfillment,Dialogflow Es,Actions On Google,Dialogflow Es Fulfillment,每当用户调用my agent时,它都会显示一个要选择的选项列表和一个简单的响应,但agent会首先说出简单的响应,然后显示列表 实际的 user: Ok google talk to my test app. bot: Welcome to my test app, Here's the list of options to select. (WELCOME MESSAGE) Please select your preference (RESPONSE) <list

每当用户调用my agent时,它都会显示一个要选择的选项列表和一个简单的响应,但agent会首先说出简单的响应,然后显示列表

实际的

user: Ok google talk to my test app.
bot: Welcome to my test app, Here's the list of options to select. (WELCOME MESSAGE)
     Please select your preference (RESPONSE)
     <list appears> (LIST)
user:Ok谷歌对话我的测试应用。
机器人:欢迎使用我的测试应用程序,下面是要选择的选项列表。(欢迎辞)
请选择您的首选项(响应)
(名单)
期望

user: Ok google talk to my test app.
bot: Welcome to my test app, Here's the list of options to select. (WELCOME MESSAGE)
     <list appears> (LIST)
     Please select your preference. (RESPONSE)
user:Ok谷歌对话我的测试应用。
机器人:欢迎使用我的测试应用程序,下面是要选择的选项列表。(欢迎辞)
(名单)
请选择您的首选项。(答复)

助手是否可能首先说出欢迎消息,显示列表,然后在一定延迟后说出响应?

将webhook添加到您的操作中,并使用浏览转盘JSON来实现目的。在列表项后添加SimpleResponse节点,以在显示列表后添加响应。用于浏览旋转木马的JSON示例:

{
  "payload": {
    "google": {
      "expectUserResponse": true,
      "richResponse": {
        "items": [
          {
            "simpleResponse": {
              "textToSpeech": "Here's an example of a browsing carousel."
            }
          },
          {
            "carouselBrowse": {
              "items": [
                {
                  "title": "Title of item 1",
                  "openUrlAction": {
                    "url": "https://example.com"
                  },
                  "description": "Description of item 1",
                  "footer": "Item 1 footer",
                  "image": {
                    "url": "https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png",
                    "accessibilityText": "Image alternate text"
                  }
                },
                {
                  "title": "Title of item 2",
                  "openUrlAction": {
                    "url": "https://example.com"
                  },
                  "description": "Description of item 2",
                  "footer": "Item 2 footer",
                  "image": {
                    "url": "https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png",
                    "accessibilityText": "Image alternate text"
                  }
                }
              ]
            }
          }
        ]
      }
    }
  }
}

请参阅“否”,不可能在列表后显示气泡。

当您在回复中添加列表时,口语文本将始终显示在列表之前。这主要是因为谈话的口语/聊天部分与谈话的视觉部分是分开的。即使在代码中的列表之后添加响应,富响应的显示也是由Google控制的

例如:

从您的示例来看,似乎您正试图在屏幕上向用户显示几个选项来控制对话,您确定这不是更好的选择吗?这些芯片旨在为用户提供选择,比列表更容易实现

推迟演讲,而不是泡沫

如果你不想这样做,你可以做的是通过语音在口语文本中添加延迟,但这只会改变人们通过语音使用你的动作的体验。在手机上使用谷歌助手时,它不会改变语音气泡的显示位置。对于在没有屏幕的情况下使用您的操作的任何人来说,这可能会导致混乱,因为列表的语音被延迟,而列表永远不会显示在他们的设备上,因为它没有屏幕

以语音第一体验进行设计

总的来说,围绕对话中的语音部分设计对话是一种很好的做法。通过使您的谈话在列表上可靠,您可以限制您可以将操作部署到的平台数量。语音优先解决此问题的方法可能是为您的操作支持的每个选项创建意图,并用一条通用消息(如“我可以如何帮助您?”)打开欢迎意图,并有一个回退意图,您可以通过说出用户可以使用的不同选项来帮助用户。这可以与建议芯片相结合,仍然可以提供你想要的指导性视觉效果

要实现它需要做更多的工作,但它确实给了您的bot更多的对话灵活性和它可以支持的平台数量

  conv.ask('This is a list example.');
  // Create a list
  conv.ask(new List({
    title: 'List Title',
    items: {
      'SELECTION_KEY_ONE': {
        synonyms: [
          'synonym 1',
          'synonym 2',
          'synonym 3',
        ],
        title: 'Title of First List Item',
        description: 'This is a description of a list item.',
        image: new Image({
          url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png',
          alt: 'Image alternate text',
        }),
      },
      'SELECTION_KEY_TWO': {
        synonyms: [
          'synonym 4',
          'synonym 5',
          'synonym 6',
        ],
        title: 'Title of Second List Item',
        description: 'This is a description of a list item.',
        image: new Image({
          url: 'https://storage.googleapis.com/actionsresources/logo_assistant_2x_64dp.png',
          alt: 'Image alternate text',
        }),
      }
    }
  }));

  conv.ask("Please make your selection");