Sfoglia il codice sorgente

feat: automatically ban channels that exceeded quota

CaIon 1 anno fa
parent
commit
a7cfce24d0
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      service/channel.go

+ 2 - 0
service/channel.go

@@ -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
 }