可点击的响应,例如Dialgflow中的按钮 [英] Clickable response such as a button in Dialgflow

查看:55
本文介绍了可点击的响应,例如Dialgflow中的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用dialogflow为它的android应用程序开发一个聊天机器人,它的运行非常正常。但是现在我需要从我的机器人那里获得可点击的响应。举例来说,假设应用程式使用者要求一个特定的位置。我希望Dialogflow chatbot返回一个按钮或一个链接作为响应,以便用户可以单击该按钮或链接,然后将其重定向到Google地图。

I have been developing a chatbot for my android app using dialogflow and its working perfectly. But now I've a requirement to get a clickable response from my chabot. For example, let's say that the app user is asking for a specific location. I want Dialogflow chatbot to return a button or a link as the response so that the user could click on that and be redirected to the google maps.

我经历了一个很多教程,博客和文档,但我还没有找到令人满意的答案。如果您也可以通过代码示例帮助我,将不胜感激。

I have went through a lot of tutorials, blogs and docs yet I've not been able to find a satisfying answer. If you could help me with a code example as well, that would be really appreciated.

预先感谢您

推荐答案

在Dialogflow的意图部分中,单击响应中的 Google助手。
选择链接退出建议,用于提供可点击的链接。
如果您只想要没有链接的按钮,则可以使用建议筹码。
在UI代码上,您需要对其进行解析并将其呈现为可单击的按钮。

Inside the Intent section in Dialogflow, click on "Google Assistant" in Responses. Select "Link Out Suggestion" which is used for giving a clickable link. In case if you just want the button without link then you can use "Suggestion Chips". On the UI code you will need to parse it and render it as clickable button.

请参见以下对话框流的屏幕截图:

See screenshots below from dialogflow:

有关更多详细信息,请参见> https://www.kommunicate.io/blog/rich-message-button- response-dialogflow-chatbot /

For more details, refer to https://www.kommunicate.io/blog/rich-message-button-response-dialogflow-chatbot/

这篇关于可点击的响应,例如Dialgflow中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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