Streaming response for custom actions - Rasa CALM - Rasa Community Forum

👋 Introducing the Rasa Playground

Streaming response for custom actions

post by avatar on Mar 19, 2024

I was thinking of using openai api within a custom action and stream the streaming response coming from openai to my chatbot. Openai is giving me streaming response and i am doing “dispatcher.utter_message(openai_res_chunk)” from actions, but the response is not getting streamed in chunks to my bot and is available only after last chunk from openai. I am also passing “stream”: True while sending request to rasa server, but nothing is working. How to achieve this?

post by jtrasa on Mar 25, 2024

Out of the box, the SDK CollectingDispatcher does not support streaming (see source code here).

Given that Rasa has an open source offering, you could extend the SDK to add streaming, however I don’t have any guidance for you on how to do so.

post by saimadib on Jan 14, 2025

Is there any way to stream the response?

Related topics

Topic Replies Views Activity
Implementing Streaming Responses in Rasa for a ChatGPT-like Experience
Rasa Open Source
7 1.5k Jan 2025
How to stream real time openai response using rasa?
Rasa Open Source
6 982 Mar 2024
Stream receiving messages with stream=true in PHP
Rasa Open Source
1 465 Nov 2023
Issue with fetching response from custom action in Rasa weather chatbot
Rasa Open Source
1 1.0k May 2019
How to get response text of “next_action”
Rasa Open Source
8 1.8k Feb 2019