# How to stream real time openai response using rasa?

**URL:** <https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992>\
**Category:** Rasa Open Source\
**Created:** [July 13, 2023, 6:42am UTC](https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992 "2023-07-13T06:42:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpark2111](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jpark2111](https://forum.rasa.com/u/jpark2111)\
**Post date:** [July 13, 2023, 6:42am UTC](https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992/1 "2023-07-13T06:42:47Z")

</div>

Hi All, I’m integrating gpt-3.5 llm using langchain in the custom action. rasa server is up and running and our frontend chatbot is talking to the server via http. Anyone knows or can suggests a way to render streaming response from llm? I can see I get streaming response from openai api but can’t think of how it could be transferred as real-time http response to the front end. Any opinion would be appreciated!! Thanks.

---

<div class="post-metadata">

**Author:** ![jpark2111](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jpark2111](https://forum.rasa.com/u/jpark2111)\
**Post date:** [July 13, 2023, 6:45am UTC](https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992/2 "2023-07-13T06:45:16Z")

</div>

[rasa.core.channels.rest](https://rasa.com/docs/rasa/reference/rasa/core/channels/rest/#stream_response) I found this doc, is this a way to go?? If this is the case that means I need to upgrade my rasa version to 3…

---

<div class="post-metadata">

**Author:** ![anoopshrma](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/anoopshrma/32/13349_2.png) [@anoopshrma](https://forum.rasa.com/u/anoopshrma)\
**Post date:** [July 13, 2023, 7:05am UTC](https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992/3 "2023-07-13T07:05:38Z")

</div>

Hi @jpark2111

Yes. If it is not available in Rasa 2.x then you’ll have to upgrade to Version 3.x

---

<div class="post-metadata">

**Author:** ![wedrano99](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/wedrano99/32/7673_2.png) [@wedrano99](https://forum.rasa.com/u/wedrano99)\
**Post date:** [July 25, 2023, 12:19pm UTC](https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992/4 "2023-07-25T12:19:56Z")

</div>

Maybe you need a websocket or socketio, I use this to send messages to the frontend.

---

<div class="post-metadata">

**Author:** ![parth1311](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@parth1311](https://forum.rasa.com/u/parth1311)\
**Post date:** [October 4, 2023, 4:31am UTC](https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992/5 "2023-10-04T04:31:48Z")

</div>

I am using OpenAI API with rasa for generating responses and I am getting responses as well. Now i want to get streamed responses in my VS Code terminal just like ChatGPT. Is there any way to do it? If it cane be done with: [rasa.core.channels.rest](https://rasa.com/docs/rasa/reference/rasa/core/channels/rest/#stream_response), how to use it in my actions.py file. Or are there any other ways ??

I am using rasa version 3.5.0

---

<div class="post-metadata">

**Author:** ![zchenchen1999](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/zchenchen1999/32/22683_2.png) [@zchenchen1999](https://forum.rasa.com/u/zchenchen1999)\
**Post date:** [February 15, 2024, 4:59am UTC](https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992/7 "2024-02-15T04:59:18Z")

</div>

Any solution to this? Thanks!

---

<div class="post-metadata">

**Author:** ![avatar](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/avatar/32/23882_2.png) [@avatar](https://forum.rasa.com/u/avatar)\
**Post date:** [March 19, 2024, 9:17pm UTC](https://forum.rasa.com/t/how-to-stream-real-time-openai-response-using-rasa/58992/8 "2024-03-19T21:17:57Z")

</div>

anybody able to figure this out?
