How to Use Pipedream Workflow for Real-time Server-Sent Events with OpenAI API?

This topic was automatically generated from Slack. You can find the original thread here.

Hey guys, I am experimenting with the OpenAi API a lot lately. I am particularly interested in the chat API with streaming activated. I found this nice tutorial. I tried to call the API in a pipedream workflow but struggle to send the results in real-time to my app. Even $.send.sse did not work out for me. The events where not streamed in real-time, but only when the workflow finish. I wonder: Is it possible to receive and send Server-Sent-Events in one workflow in pipedream in real-time?

great question. Not natively in Pipedream (but we can support this capability eventually, it’s just not supported currently).

Some SaaS services like Pusher and Ably support this and are purpose-built for real-time streaming like this. As you process data events from the OpenAI SSE stream, you can push that data to those services, which can route the data to another client app in real-time

1 Like