Assistant Streaming: WebSockets VS SSE

Hi everyone,

I’m currently evaluating the best method for implementing streaming in an assistant application and I’m torn between using WebSockets and Server-Sent Events (SSE). While WebSockets offer robust, bidirectional communication, which is great for real-time interaction, they do require handling complexities such as connection persistence and reconnections. On the other hand, SSE appears simpler as it supports unidirectional communication and could potentially reduce the overhead associated with maintaining connections.

However, the majority of streaming implementations with assistants I’ve seen tend to use WebSockets, possibly due to the need for more control over the communication process. This has made me wonder if SSE might be too simplistic for scenarios that might require more complex interaction patterns.

Has anyone here experimented with using SSE for assistant-driven applications? What were your experiences compared to using WebSockets, especially in terms of handling more complex interactions and maintaining stream reliability?

Any insights or experiences you could share would be greatly appreciated as I navigate these options.

There are many companies that have disabled websocket… I am one of the victims, my chatgpt cannot receive responses from today, the interaction mode has been switched to websocket in the log, and I cannot complete the chain building.

I had to use SSE as I didnt get the websockets to work.

That being said, SSE works perfeclty