mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-10 08:03:41 +08:00
fix: openai response time
This commit is contained in:
@@ -40,6 +40,7 @@ func OpenaiStreamHandler(c *gin.Context, resp *http.Response, info *relaycommon.
|
||||
|
||||
go func() {
|
||||
for scanner.Scan() {
|
||||
info.SetFirstResponseTime()
|
||||
ticker.Reset(time.Duration(constant.StreamingTimeout) * time.Second)
|
||||
data := scanner.Text()
|
||||
if len(data) < 6 { // ignore blank line or wrong format
|
||||
|
||||
Reference in New Issue
Block a user