mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-22 02:06:38 +08:00
feat: update shouldRetry
This commit is contained in:
parent
1a39ef74ce
commit
89ebd85503
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user