refactor: Extract operation-related settings into a separate package

This commit is contained in:
1808837298@qq.com committed 2025-03-04 18:52:08 +08:00
1 parent 6f64e6cde9
commit da79af07d2
5 files changed
+15 -12

No files matched your search

+2 -2
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
}