gpt4 book ai didi

node.js - 如何在 Azure 机器人消息文本中添加超链接

转载 作者:行者123 更新时间:2023-12-03 08:19:59 25 4
gpt4 key购买 nike

我最近开始在 Node js 中创建一个 Azure 机器人。我想在机器人响应之一中添加一个超链接,并在用户单击它后发送主动响应。像这样的东西:

请点击此链接完成付款

并且该链接应该是一个将重定向到端点的超链接。

我已经尝试找到一种方法来实现它,但到目前为止,我还没有能够实现。我看到了以下链接:

https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-send-activity?view=azure-bot-service-4.0

https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-add-media-attachments?view=azure-bot-service-4.0&tabs=javascript

有人可以建议我实现这一目标的方法吗?

最佳答案

您可以使用 Markdown 语法。

The text must be treated as markdown formatting and rendered on thechannel as appropriate.

超链接 Markdown 语法:

[click this link](https://www.google.com/)

根据您的代码,它看起来如下所示:

Please [click this link](www.greetings.com) to complete the payment 

引用:

  1. Format text in chatbot
  2. Markdown syntax

关于node.js - 如何在 Azure 机器人消息文本中添加超链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68151613/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com