feat: automatically ban channels that exceeded quota

This commit is contained in:
CaIon
2024-04-07 22:22:27 +08:00
parent 9ba6abedd9
commit 0180f51f51

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
}