From a29e3765f4b4ea5ba52da4bf353f49a1c3ce6ea5 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Wed, 13 Dec 2023 00:29:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgpts=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=80=8D=E7=8E=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/model-ratio.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/model-ratio.go b/common/model-ratio.go index f56306c..0aa6aa6 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -15,6 +15,7 @@ import ( // 1 === ¥0.014 / 1k tokens var ModelRatio = map[string]float64{ "midjourney": 50, + "gpt-4-gizmo-*": 15, "gpt-4": 15, "gpt-4-0314": 15, "gpt-4-0613": 15, @@ -89,6 +90,9 @@ func UpdateModelRatioByJSONString(jsonStr string) error { } func GetModelRatio(name string) float64 { + if strings.HasPrefix(name, "gpt-4-gizmo") { + name = "gpt-4-gizmo-*" + } ratio, ok := ModelRatio[name] if !ok { SysError("model ratio not found: " + name)