取消429自动禁用
This commit is contained in:
parent
d429992be2
commit
2a3373cc8c
@ -135,7 +135,7 @@ func shouldDisableChannel(err *OpenAIError, statusCode int) bool {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if statusCode == http.StatusUnauthorized || statusCode == http.StatusTooManyRequests {
|
if statusCode == http.StatusUnauthorized {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if err.Type == "insufficient_quota" || err.Code == "invalid_api_key" || err.Code == "account_deactivated" {
|
if err.Type == "insufficient_quota" || err.Code == "invalid_api_key" || err.Code == "account_deactivated" {
|
||||||
|
Loading…
Reference in New Issue
Block a user