From bf94893f6ac5703351ee9dc6fa5b2b7b2d01a544 Mon Sep 17 00:00:00 2001 From: xqx333 <141810964+xqx333@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:03:51 +0800 Subject: [PATCH] Update model-ratio.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复gpt-4-1106-preview和gpt-4-0125-preview的输出倍率错误 --- common/model-ratio.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/model-ratio.go b/common/model-ratio.go index a6f3224..3f9f86c 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -202,7 +202,7 @@ func GetCompletionRatio(name string) float64 { return 4.0 / 3.0 } if strings.HasPrefix(name, "gpt-4") { - if strings.HasSuffix(name, "gpt-4-turbo") { + if strings.HasPrefix(name, "gpt-4-turbo")|| strings.HasSuffix(name, "preview") { return 3 } return 2