Styling response output - bullet points

Hey Rasa community,

Wondering if there is a way to stylize response format so that I can use bullet points in a response.

For example if creating an intent where the user asks what the bot can do, the bot replies with a bullet point list of a few tasks it can do.

user asks:

What can you do?

bot responds:

I can perform the following:

- option 1
- option 2
- option 3

So far I’ve tried something in the response string like:

utter_response: - “I can perform the following:\n- option 1\n- option 2\n- option 3”

However, this doesn’t render as intended with the carriage return characters (it prints the “\n” as a string as part of the response).

Is there something obvious that I am missing (such as another character code to use) or is this not supported in default text out? Is it something that has to be rendered on client side (example depending on the chat client one uses)?

Just looking for a bit of advise if we can style responses easily in the utterances.

Thanks! Patrick


I think it will work if you use this as the response:

I can perform the following:\n \- option 1\n \- option 2\n \- option 3

Thanks Arjaan,

I tried that and realized after searching some more posts that the \n is valid for python string formatting, however for utterances in the domain file I needed to read up on YAML markdown to format appropriately.

There is also another thread here with information for anyone else searching for this info on the forums:

Bullet Point formatting in YAML

Yaml Multi Line String Docs

I used the pipe symbol formatting as block style indicator and then just double tabbed in my plain text underneath the section using just regular enter (carriage return) instead of the \n delineator, like the following:

text: |

I can perform the following:

  • Option 1
  • Option 2
  • Option 3

I tested it and it’s working in the chatroom responses - so thanks for the reply and leaving info for the next person with the same question! :slight_smile:

Thanks, Patrick