From 11eaba6b5d8e045d3152dd7b549b51ce6af40ade Mon Sep 17 00:00:00 2001 From: wozulong <> Date: Sun, 24 Mar 2024 00:17:49 +0800 Subject: [PATCH] fix gpt-3.5-turbo points Signed-off-by: wozulong <> --- common/model-ratio.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/common/model-ratio.go b/common/model-ratio.go index 7c6a012..cc9a6bd 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -3,7 +3,6 @@ package common import ( "encoding/json" "strings" - "time" ) // modelRatio @@ -27,7 +26,7 @@ var DefaultModelRatio = map[string]float64{ "gpt-4-turbo-preview": 5, // $0.01 / 1K tokens "gpt-4-vision-preview": 5, // $0.01 / 1K tokens "gpt-4-1106-vision-preview": 5, // $0.01 / 1K tokens - "gpt-3.5-turbo": 0.75, // $0.0015 / 1K tokens + "gpt-3.5-turbo": 0.25, // $0.0005 / 1K tokens "gpt-3.5-turbo-0301": 0.75, "gpt-3.5-turbo-0613": 0.75, "gpt-3.5-turbo-16k": 1.5, // $0.003 / 1K tokens @@ -194,15 +193,10 @@ func GetCompletionRatio(name string) float64 { if strings.HasSuffix(name, "1106") { return 2 } - if name == "gpt-3.5-turbo" || name == "gpt-3.5-turbo-16k" { - // TODO: clear this after 2023-12-11 - now := time.Now() - // https://platform.openai.com/docs/models/continuous-model-upgrades - // if after 2023-12-11, use 2 - if now.After(time.Date(2023, 12, 11, 0, 0, 0, 0, time.UTC)) { - return 2 - } + if name == "gpt-3.5-turbo" { + return 3 } + return 1.333333 } if strings.HasPrefix(name, "gpt-4") {