mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-22 02:06:38 +08:00
feat: 超时状态码不重试
This commit is contained in:
parent
fc9f8c8e8a
commit
fed1a1d6a3
@ -93,6 +93,10 @@ func shouldRetry(c *gin.Context, channelId int, openaiErr *dto.OpenAIErrorWithSt
|
||||
return true
|
||||
}
|
||||
if openaiErr.StatusCode/100 == 5 {
|
||||
// 超时不重试
|
||||
if openaiErr.StatusCode == 504 || openaiErr.StatusCode == 524 {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
if openaiErr.StatusCode == http.StatusBadRequest {
|
||||
|
Loading…
Reference in New Issue
Block a user