How to handle SSE responses independently for each HTTP request like ChatGPT?
Closed this issue · 1 comments
STARKXu commented
The documentation seems to lean towards Redis' publish/subscribe functionality, but I don't understand how to return data independently for each HTTP request, similar to how ChatGPT responds.
tpeczek commented
Every "request" is represented as a client ('IServerSentEventsClient') to which you can send events directly.
You can also utilize the 'ClientConnected' event to kick-off a client-specific background processing which will later send events to this client (you can transfer there reference to the client object or just the client identifier based on which you can retrieve client object later).