mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-14 23:00:27 +00:00
perf: use slice to improve efficiency (#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: [DONE]"
|
||||
data = data[:12]
|
||||
}
|
||||
c.Render(-1, common.CustomEvent{Data: data})
|
||||
return true
|
||||
|
Reference in New Issue
Block a user