feat: update shouldRetry

This commit is contained in:
CaIon 2024-04-23 22:17:36 +08:00
parent 1a39ef74ce
commit 89ebd85503

View File

@ -109,6 +109,10 @@ func shouldRetry(c *gin.Context, channelId int, openaiErr *dto.OpenAIErrorWithSt
if openaiErr.StatusCode == http.StatusBadRequest { if openaiErr.StatusCode == http.StatusBadRequest {
return false return false
} }
if openaiErr.StatusCode == 408 {
// azure处理超时不重试
return false
}
if openaiErr.LocalError { if openaiErr.LocalError {
return false return false
} }