feat: automatically ban channels that exceeded quota

This commit is contained in:
CaIon 2024-04-07 22:22:27 +08:00
parent 34bf8f8945
commit a7cfce24d0

View File

@ -57,6 +57,8 @@ func ShouldDisableChannel(err *relaymodel.OpenAIError, statusCode int) bool {
return true
} else if strings.HasPrefix(err.Message, "This organization has been disabled.") {
return true
} else if strings.HasPrefix(err.Message, "You exceeded your current quota") {
return true
}
return false
}