简体   繁体   English

Dialogflow-Google Assistant:多行显示建议

[英]Dialogflow - Google Assistant: Show suggestions in multiple lines

I want to show a list of suggestions to the user, and as expected I do it like: 我想向用户显示建议列表,并且按预期方式执行:

new Suggestions('option 1', 'option 2', 'option 3', '...');

But the problem is that this way the suggestions are shown in a single row and the user will have to do horizontal scroll to reach all suggestions. 但是问题在于,这样建议以单行显示,并且用户将不得不进行水平滚动才能找到所有建议。

Instead, I would prefer to organize the suggestions in a table view in order to have multiple rows. 相反,我希望在表格视图中组织建议,以便具有多行。

I thought I could get through this using this approach but it doesn't seem to work: 我以为我可以使用这种方法来解决这个问题,但似乎行不通:

new Table({
    dividers: true,
         columns: ['header 1', 'header 2', 'header 3'],
         rows: [
           [new Suggestions('opt 1-1'), new Suggestions('opt 1-2'), new Suggestions('opt 1-3')],
           [new Suggestions('opt 2-1'), new Suggestions('opt 2-2'), new Suggestions('opt 2-3')],
         ]
})

Does anyone know any other way how to achieve this? 有谁知道其他方法如何实现这一目标?

There's not really a way to show suggestions within a table. 表格中实际上没有显示建议的方法。 You could show a table of plain text, inviting the user to say one of the options, but you won't get the interactive widgets. 您可以显示一个纯文本表,邀请用户说出其中一个选项,但是您不会获得交互式窗口小部件。

The idea of the suggestion chips is to suggest but not mandate a handful of potential things that the user might say to continue the conversation, and the horizontal row is meant to highlight the most frequent. 建议芯片的想法是建议但不强制要求用户说几句可能会继续对话的内容,并且水平行旨在突出显示最频繁的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Dialogflow-Google Assistant:显示带有图标和文字的建议 - Dialogflow - Google Assistant: Show suggestions with icon + text 在Google Assistant上捕获Lakhs和Crores中的数字-Dialogflow - Capturing numbers in Lakhs and Crores on Google Assistant - Dialogflow Dialogflow - Google智能助理:显示消息后的setFollowupEvent - Dialogflow - Google Assistant: setFollowupEvent after showing a message 使用 dialogflow 通过谷歌助手聊天机器人输入图像 - Image input through google assistant chat bot using dialogflow 如何在Dialogflow履行中检测到返回到Android上的Google Assistant的用户? - How to detect a returning user to Google Assistant on Android in Dialogflow fulfillments? Dialogflow / Google上的操作:提供动态响应数据以提供链接建议 - Dialogflow / Actions on Google: Provide dynamic response data for link out suggestions 具有 Dialogflow 功能的 Foreach 建议 - Foreach suggestions with function Dialogflow 如何在Google Assistant应用中发送多个语句? - How to send multiple statements in google assistant app? 我希望我的Google Assistant应用程序先与我的网络服务器对话,然后再与dialogflow对话 - I want my google assistant application to talk to my webserver first and then dialogflow 从实时数据库获取JSON数据到Dialogflow内联编辑器(Google助手) - get json data from realtime database to Dialogflow inline editor (google assistant)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM