How to send results to frontend UI in different attachments

Hey, I’m using my bot to collect some information from user and then using that information I’m calling api to get results, everything is working fine and rasa is sending results to UI in an attachment (using custom action). below is a story:

image

In the first story there are 4 actions performed by bot, few of them are utterances and few are custom actions sending attachments to UI. Now my problem is that rasa is sending all the messages in a single attachment to the UI (i.e. utter_messages, attachments, messages from api). so if api is taking time to fetch results, rasa is not sending utter_messages to UI. It will wait for all the actions to execute and then send all the 4 results in a single attachment. I want to send results in 4 different attachments so that while api is getting results from server, user will get results from previous actions. Any idea how to do that?

Here is how i’m getting messages on web:

image

I want first message to come first so that user can alteast have a reply from rasa while it is fetching data from api and performing operations (it takes few secs). @btotharye @akelad