refactor: Extract operation-related settings into a separate package

This commit is contained in:
1808837298@qq.com
2025-03-04 18:52:08 +08:00
parent 7855f83e2d
commit 98b27a17a6
5 changed files with 15 additions and 12 deletions

View File

@@ -6,7 +6,7 @@ import (
"one-api/common"
"one-api/dto"
"one-api/model"
"one-api/setting"
"one-api/setting/operation_setting"
"strings"
)
@@ -67,7 +67,7 @@ func ShouldDisableChannel(channelType int, err *dto.OpenAIErrorWithStatusCode) b
}
lowerMessage := strings.ToLower(err.Error.Message)
search, _ := AcSearch(lowerMessage, setting.AutomaticDisableKeywords, true)
search, _ := AcSearch(lowerMessage, operation_setting.AutomaticDisableKeywords, true)
if search {
return true
}