From 2340178bb2350d86f2a9a040061ebab76725d59d Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 24 Dec 2023 16:15:55 +0800 Subject: [PATCH] fix: remove custom suffix when get model ratio --- common/model-ratio.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/model-ratio.go b/common/model-ratio.go index d1c96d96..d6b51f84 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -115,6 +115,9 @@ func UpdateModelRatioByJSONString(jsonStr string) error { } func GetModelRatio(name string) float64 { + if strings.HasPrefix(name, "qwen-") && strings.HasSuffix(name, "-internet") { + name = strings.TrimSuffix(name, "-internet") + } ratio, ok := ModelRatio[name] if !ok { SysError("model ratio not found: " + name)