Skip to content

Commit

Permalink
fix: channel auto ban
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Aug 24, 2024
1 parent ff0985f commit 46e0368
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controller/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ func shouldRetry(c *gin.Context, openaiErr *dto.OpenAIErrorWithStatusCode, retry
if openaiErr == nil {
return false
}
if openaiErr.LocalError {
return false
}
if retryTimes <= 0 {
return false
}
Expand Down Expand Up @@ -151,9 +154,6 @@ func shouldRetry(c *gin.Context, openaiErr *dto.OpenAIErrorWithStatusCode, retry
// azure处理超时不重试
return false
}
if openaiErr.LocalError {
return false
}
if openaiErr.StatusCode/100 == 2 {
return false
}
Expand Down

0 comments on commit 46e0368

Please sign in to comment.