如何在响应中为我的Dialogflow Chatbot创建超链接 [英] How To Create A Hyperlink For My Dialogflow Chatbot In Responses

查看:108
本文介绍了如何在响应中为我的Dialogflow Chatbot创建超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用dialogflow创建了一个聊天机器人,并在响应中添加了一个网站链接,我将该机器人集成到了Telegram中,并且该网站链接运行良好,但是在网络演示中却没有。

解决方案

Kommunicate有链接按钮,当我使用Kommunicate将聊天机器人集成到网站上时,超链接是否有效?模板,使用下面的元数据创建Dialogflow意图。

  {
message:单击按钮,
platform: kommunicate,
元数据:{
contentType: 300,
templateId: 3,
有效负载:[{
type: link,
url: https://www.google.com,
name:转到Google
},
{
type: link,
url: https://www.facebook.com,
name :转到Facebook,
openLinkInNewTab:false
}
]
}
}

openLinkInNewTab:false 在同一选项卡中打开任何链接。默认值为true,这将在新选项卡中打开链接。
此处是有关此内容的更多信息。 p>

此外,您可以将HTML内容呈现为消息,并且Kommunicate将在UI中呈现HTML。 此处是该数据的元数据。


I created a chatbot using dialogflow and I added a website link to the response, I have integrated the bot in Telegram and the website link is working perfectly, but on the web demo, it is not. Is it possible that when I integrate the chatbot on a website using Kommunicate, the hyperlink will work?

解决方案

Kommunicate has a link button template, create a Dialogflow intent using below metadata.

{
    "message": "click on the buttons",
    "platform":"kommunicate",
    "metadata": {
        "contentType": "300",
        "templateId": "3",
        "payload": [{
                "type": "link",
                "url": "https://www.google.com",
                "name": "Go To Google"
            },
            {
                "type": "link",
                "url": "https://www.facebook.com",
                "name": "Go To Facebook",
                "openLinkInNewTab": false
            }
        ]
    }
}

The openLinkInNewTab: false to open any link in the same tab. Default value is true, which will open the links in the new tab. Here is more information about the same.

Also, you can render HTML content as a message and Kommunicate will render the HTML in the UI. Here is the metadata for that.

这篇关于如何在响应中为我的Dialogflow Chatbot创建超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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