简体   繁体   English

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

[英]How to add a new line in IBM Watson chatbot conversation?

Currently I'm working with the chatbot service provided by the IBM Watson Coversation api. 目前,我正在使用IBM Watson Coversation api提供的chatbot服务。 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? 谁能告诉我该怎么做?

in this case, you can use HTML for that, inside conversation flow with <br> . 在这种情况下,您可以在<br>内部对话流中使用HTML

Check my example: 检查我的例子:

在此处输入图片说明

You can see that does not work in "Try it out": 您可以在“试用”中看到它不起作用:

在此处输入图片说明

But if you open with a browser, you see that work: 但是,如果使用浏览器打开,则会看到该工作:

在此处输入图片说明

Check JSON example: 查看JSON示例:

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

You can use other tags, example: <button> , <id> , etc. 您可以使用其他标签,例如: <button><id>等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM