fix: Ignore EOF errors in OpenAI stream scanner

This commit is contained in:
1808837298@qq.com
2025-03-04 17:35:41 +08:00
parent a42c3b6227
commit eb46b71a71

View File

@@ -158,8 +158,10 @@ func OaiStreamHandler(c *gin.Context, resp *http.Response, info *relaycommon.Rel
} }
if err := scanner.Err(); err != nil { if err := scanner.Err(); err != nil {
if err != io.EOF {
common.LogError(c, "scanner error: "+err.Error()) common.LogError(c, "scanner error: "+err.Error())
} }
}
common.SafeSendBool(stopChan, true) common.SafeSendBool(stopChan, true)
}) })