This commit is contained in:
CaIon committed 2023-09-09 01:50:41 +08:00
1 parent a4cf25f4c6
commit e25bcce452
5 files changed
+43 -21

No files matched your search

+1 -1
View File
@@ -207,7 +207,7 @@ func Relay(c *gin.Context) {
channelId := c.GetInt("channel_id")
common.SysError(fmt.Sprintf("relay error (channel #%d): %v ", channelId, err))
// https://platform.openai.com/docs/guides/error-codes/api-errors
if shouldDisableChannel(&err.OpenAIError) {
if shouldDisableChannel(&err.OpenAIError, err.StatusCode) {
channelId := c.GetInt("channel_id")
channelName := c.GetString("channel_name")
disableChannel(channelId, channelName, err.Message)