mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-08 23:23:42 +08:00
fix: 如果还有数据,等待一会
This commit is contained in:
@@ -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
|
stopChan <- true
|
||||||
}()
|
}()
|
||||||
setEventStreamHeaders(c)
|
setEventStreamHeaders(c)
|
||||||
|
|||||||
Reference in New Issue
Block a user