Open joveth1 opened 5 months ago
Looks like chanStream
received response (chanStream <- response
in Goroutine) so quickly that like Gin return all results at once. How about add one line time.Sleep(time.Duration(1) * time.Second)
after chanStream <- response
?
Description
I'm using the stream to response gptchat result to front.
My Demo like :
The response not result as a text/event-stream .It's return all the results at once.
I'm also test using c.SSEvent("message", msg), It's also returned all the results at once.
Actual result
returned all the result at once.
Environment