mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 00:07:27 +00:00
fix: 未设置价格模型不会被拉取,除非设置自用模式
This commit is contained in:
@@ -823,3 +823,16 @@ func FormatMatchingModelName(name string) string {
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
// result: 倍率or价格, usePrice, exist
|
||||
func GetModelRatioOrPrice(model string) (float64, bool, bool) { // price or ratio
|
||||
price, usePrice := GetModelPrice(model, false)
|
||||
if usePrice {
|
||||
return price, true, true
|
||||
}
|
||||
modelRatio, success, _ := GetModelRatio(model)
|
||||
if success {
|
||||
return modelRatio, false, true
|
||||
}
|
||||
return 37.5, false, false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user