mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-16 08:04:10 +00:00
fix: fix "[DONE is not valid JSON" (#57)
This commit is contained in:
@@ -210,7 +210,7 @@ func relayHelper(c *gin.Context) error {
|
||||
select {
|
||||
case data := <-dataChan:
|
||||
if strings.HasPrefix(data, "data: [DONE]") {
|
||||
data = data[:len(data)-1]
|
||||
data = "data: [DONE]"
|
||||
}
|
||||
c.Render(-1, common.CustomEvent{Data: data})
|
||||
return true
|
||||
|
Reference in New Issue
Block a user