From a0c4e9f10eb4333d45fb221f0c51e7b46abd376f Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Fri, 2 Feb 2024 12:46:12 +0800 Subject: [PATCH] feat: add model gpt-3.5-turbo-0125 --- common/model-ratio.go | 8 ++++++-- controller/model.go | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/common/model-ratio.go b/common/model-ratio.go index eb268a6..3b0f540 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -34,8 +34,9 @@ var ModelRatio = map[string]float64{ "gpt-3.5-turbo-16k-0613": 1.5, "gpt-3.5-turbo-instruct": 0.75, // $0.0015 / 1K tokens "gpt-3.5-turbo-1106": 0.5, // $0.001 / 1K tokens - "babbage-002": 0.2, // $0.0004 / 1K tokens - "davinci-002": 1, // $0.002 / 1K tokens + "gpt-3.5-turbo-0125": 0.25, + "babbage-002": 0.2, // $0.0004 / 1K tokens + "davinci-002": 1, // $0.002 / 1K tokens "text-ada-001": 0.2, "text-babbage-001": 0.25, "text-curie-001": 1, @@ -148,6 +149,9 @@ func GetModelRatio(name string) float64 { func GetCompletionRatio(name string) float64 { if strings.HasPrefix(name, "gpt-3.5") { + if strings.HasSuffix(name, "0125") { + return 3 + } if strings.HasSuffix(name, "1106") { return 2 } diff --git a/controller/model.go b/controller/model.go index d2ba62d..39c4acf 100644 --- a/controller/model.go +++ b/controller/model.go @@ -180,6 +180,15 @@ func init() { Root: "gpt-3.5-turbo-1106", Parent: nil, }, + { + Id: "gpt-3.5-turbo-0125", + Object: "model", + Created: 1706232090, + OwnedBy: "openai", + Permission: permission, + Root: "gpt-3.5-turbo-0125", + Parent: nil, + }, { Id: "gpt-3.5-turbo-instruct", Object: "model",