When Rasa answers a question, those answers may contain several lengthy sentences. This can be difficult to read. It would be nice, if we could break these paragraphs up and send the individual sentences to the user, in a delayed manner.
From within a custom action, you can call dispatcher.utter_template (or utter_message) multiple times and the user will get multiple messages even though only a single action got executed.
Not sure if we removed this, but I think you can also create multiple messages by using a double newline:
"Hey how are you?\n\n I am here to help!".
Hi tmbo , i agree on first point that we can send multiple response using utter_message multiple times but
your point of add “\n\n” is not working.
\n\n is adding a new line when send response back to bot but its not splitting the string in actions .
Does rasa have any inbuild function which does this functionality.(other approach is also fine)
ah great - the socketio connector is the only connector which doesn’t have this implemented. Would be great if you can open a feature request on github. If you have a second and want to contribute to the project: this would be a great contribution
@tmbo Yeah socketio is not support for the new line character specification (\n) into the domain.yml. Could you please provide any alternative for that?
@asc I will encourage not to follow this approach, as user will disconnected from the chat response as it will display the response as per set delay time, rather then I will encourage you please show the response in one go and only in a small paragraph and at the end provide http link [read more…],if the message is long or covering a lot of chat screen. This is the best conversational dialogue approach to engage the user. Hope you understand my points thanks.
But for your actual query it depends on the UI you are using for displaying the messages on the chat screen.
@nik202 Thanks for your response. but it doesn’t quite solve my issue.
your first suggestion returns the sentences as bullet points, there is no delay in time between them. The second suggestion returns the response in one message separated into multiple lines.
What I am trying to do is the following:
I am building a chat-bot to provide support for a specific topic, the responses are typically very long paragraphs, I want to split a single response into separate messages that get sent to the user, is there any way I can do that without having to create multiple utterances?