fix: fix relay openai panic

This commit is contained in:
CaIon committed 2024-01-10 19:26:11 +08:00
1 parent 2a3e45c43a
commit c8b3465a29
2 files changed
+17 -1

No files matched your search

+1 -1
View File
@@ -83,7 +83,7 @@ func openaiStreamHandler(c *gin.Context, resp *http.Response, relayMode int) (*O
// wait data out
time.Sleep(2 * time.Second)
}
stopChan <- true
common.SafeSend(stopChan, true)
}()
setEventStreamHeaders(c)
c.Stream(func(w io.Writer) bool {