How can we write multi line message via dispatcher.utter_message()

hi I am running this small loop for printing multiline message for my chatbot rasa v2.8

for lv in data:
     sent_str += f'{lv["lv_Type"]}: {lv["lv_Value"]} \n'
sent_str += f'total leave balance: {lv_sum}'

the message dispatched is a \n b\n c how do I correct it?

I want


@NIkhilBhaskar can you tell me what is your front-end?

@NIkhilBhaskar if you are returning a response using utterance from the domain.yml you can easily archive that, but this sometimes depends on the front-end. Can you please confirm me that what method you are using for dispactcher.utter_message i.e direct text or utterance ?

1 Like

@nik202 thanks for your response.

Yes, I just saw that on rasa server under botUttered it gives me multiline message but not on front end, I can correct that on frontend itself, btw i m sending direct text.

Thanks for help.

@NIkhilBhaskar can you please confirm me front-end?

I am using vanilla js and html, if that you are asking for

@NIkhilBhaskar you developed your own?

@NIkhilBhaskar Maybe try pass with utter_message

    text: | " Hey how are you doing? \n
              Please ask your question. \n
              etc \n"

Thanks @nik202

@NIkhilBhaskar Did that help? or are you able to solve it, if yes please can I request to close this thread.