Rasa Server + Front End with REST API

Hi, I am using @JiteshGaikwad’s UI widget with rasa open-source with REST channel.

In my story, I have a form which

  1. asks 2 details from the user
  2. prints a statement (using dispatcher in the submit part of the form)\
  3. An utterance
  4. A custom action for an API Call (This takes 3-4 seconds)
  5. Display result from API Call.

In the UI, I should be getting statements one after the other but the statements of steps 3 to 6 are displaying at once after the time delay of API Call. I checked the console and I am receiving all messages together at once from the rasa server. How to fix this?