Commit b0ee0f15 by 1808837298@qq.com

fix: Handle scanner errors in OpenAI relay stream handler

parent 894f950e
......@@ -156,6 +156,11 @@ func OaiStreamHandler(c *gin.Context, resp *http.Response, info *relaycommon.Rel
}
mu.Unlock()
}
if err := scanner.Err(); err != nil {
common.LogError(c, "scanner error: "+err.Error())
}
common.SafeSendBool(stopChan, true)
})
......
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