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

@@ -3,6 +3,7 @@ package setting
import (
"encoding/json"
"one-api/common"
"one-api/setting/operation_setting"
"strings"
"sync"
)
@@ -326,7 +327,7 @@ func GetModelRatio(name string) (float64, bool) {
ratio, ok := modelRatioMap[name]
if !ok {
common.SysError("model ratio not found: " + name)
return 37.5, SelfUseModeEnabled
return 37.5, operation_setting.SelfUseModeEnabled
}
return ratio, true
}

View File

@@ -1,4 +1,4 @@
package setting
package operation_setting
import "strings"