mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-15 07:20:26 +00:00
feat: update ratio config if missing
This commit is contained in:
@@ -81,6 +81,9 @@ func InitOptionMap() {
|
||||
func loadOptionsFromDatabase() {
|
||||
options, _ := AllOption()
|
||||
for _, option := range options {
|
||||
if option.Key == "ModelRatio" {
|
||||
option.Value = common.AddNewMissingRatio(option.Value)
|
||||
}
|
||||
err := updateOptionMap(option.Key, option.Value)
|
||||
if err != nil {
|
||||
logger.SysError("failed to update option map: " + err.Error())
|
||||
|
Reference in New Issue
Block a user