mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-08 15:13:42 +08:00
取消429自动禁用
This commit is contained in:
@@ -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" {
|
||||||
|
|||||||
Reference in New Issue
Block a user