是他们在dialogflow中发送多个简单响应的任何方式 [英] Is their any way to send multiple simple response in dialogflow

查看:70
本文介绍了是他们在dialogflow中发送多个简单响应的任何方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在调用过程中出于特定意图将简单响应发送(超过2个响应)给用户。但这仅限于Google文档操作中提到的2个简单响应。

I need to send (more than 2 responses) simple responses back to user during the invocation for particular intent. But it is restricted to 2 simple response as mentioned in actions on google documentation.

还有其他发送多个响应的方法吗?

Is there any other way to send multiple responses?

推荐答案

简短的回答是否,您一次不能发送回多个SimpleResponse。

The short answer is no, you can't send back more than one SimpleResponse at a time.

但是,有一些方法可以根据您的需要并确保您尊重良好的Visual UI设计。

There are, however, ways to work with this depending on your needs and making sure you are respecting good Visual UI design.


  1. 您可以将要发送的许多项重新组合成一个语音段落。

  1. You can concatenate many of the items you're sending back into a single spoken paragraph.

因此,如果您有以下项:

So if you have list items like:


  • 红色

  • 绿色

  • 蓝色

您可以将它们连接成一个字符串,并可以发送回一个SimpleResponse,其中包含我为您选择的颜色是红色,绿色和蓝色。

You can concatenate them into a single string and might send back a single SimpleResponse with "The colors I have selected for you are red, green, and blue."

但是如果列表很长,请小心。因此,如果您有20种左右的颜色列表,您可能会说:我选择的颜色是红色,绿色,蓝色,黄色,棕色,黑色,白色,紫色,淡紫色,桃,淡紫色,猩红色,黄金,红宝石,银,蓝绿色,灰色,橙色,青铜和珍珠。在这种情况下……

But be careful if you have a very long list. So if you have a list of 20 or so colors, you would not want to say "The colors I have selected are red, green, blue, yellow, brown, black, white, purple, lavender, peach, mauve, scarlet, gold, ruby, silver, teal, grey, orange, bronze, and pearl." In cases like this...

有很多项目,尤其是在您希望用户使用可视显示设备的地方,您可以说:几个项目(例如,最有可能出现的3个项目),并显示更少的文字内容,然后使用列表轮播以显示更完整的集合。可能看起来像这样

With lots of items, and particularly where you are expecting the user to be on a visual display device, you can say just a few of the items (say, the 3 most likely) and show a text blurb with even fewer and then use a List or Carousel to display a more complete set. This might look something like

conv.ask(new SimpleResponse({
  speech: 'The colors I have selected for you include red, green, blue, and 17 more',
  text: 'Here are the colors I have selected for you.'
});
conv.ask(new List({
  items:{
    red: {title: "red"},
    green: {title: "green"},
    blue: {title: "blue"},
    // You get the idea
    pearl: {title: "pearl"}
  }
};


  • 如果您仅使用语音,请考虑进一步缩小列表范围的方法。例如,您可能会报告我有20种颜色供您选择。是发红还是发蓝?,并继续缩小范围。

  • If you are using just voice, consider ways to narrow that list down further. For example, you might report "I have 20 colors for you. Are you looking for something more reddish or more bluish?" and continuing to narrow it down.

    作为最后的选择,您可能只想阅读可用内容的简短列表,但要指出他们还有多少其他选择,并让他们可听见地滚动列表。这不是很好,因为这需要您在p上做很多额外的工作艺术和您的用户,但这在某些情况下是个不错的选择。

    As a final alternative, you might want to read just a short list of what is available, but indicate how many other choices they have and let them "audibly scroll" through the list. This isn't great, since it requires a lot of additional work on your part and your user, but it is a good option in some cases.

    这篇关于是他们在dialogflow中发送多个简单响应的任何方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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