且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在IBM Watson chatbot对话中添加新行?

更新时间:2023-12-03 15:56:22

在这种情况下,您可以在<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.