如何在IBM Watson chatbot对话中添加新行? [英] How to add a new line in IBM Watson chatbot conversation?

查看:79
本文介绍了如何在IBM Watson chatbot对话中添加新行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前,我正在使用IBM Watson Coversation api提供的chatbot服务.现在,我遇到了一个问题,该问题涉及在聊天机器人的文本回复中添加新行.谁能告诉我该怎么做?

Currently I'm working with the chatbot service provided by the IBM Watson Coversation api. Now I'm facing a problem, related to adding a new line in the text reply from the chatbot. Can anyone tell me how to do this?

推荐答案

在这种情况下,您可以在<br>的内部对话流中使用HTML.

in this case, you can use HTML for that, inside conversation flow with <br>.

检查我的示例:

您可以在尝试一下"中看到它不起作用:

但是如果您使用浏览器打开,则会看到该工作:

检查JSON示例:

{
  "output": {
    "text": {
      "values": [
        "Hey, <br>Can I help you?",
        "",
        ""
      ],
      "selection_policy": "random"
    }
  }
}

您可以使用其他标签,例如:<button><id>等.

You can use other tags, example: <button>, <id>, etc.

这篇关于如何在IBM Watson chatbot对话中添加新行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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