Commit 4f32c033 by Xyfacai

fix: 如果还有数据,等待一会

parent 86f21a8a
......@@ -78,6 +78,10 @@ func openaiStreamHandler(c *gin.Context, resp *http.Response, relayMode int) (*O
}
}
}
if len(dataChan) > 0 {
// wait data out
time.Sleep(2 * time.Second)
}
stopChan <- true
}()
setEventStreamHeaders(c)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment