From 7822af3edc6a36e7d795103cdf74c7cac2536d8e Mon Sep 17 00:00:00 2001 From: Jiachen Date: Tue, 7 Nov 2023 13:43:53 +0800 Subject: [PATCH] [Feature] support gpt-3.5-turbo-1106 --- common/model-ratio.go | 4 ++++ controller/model.go | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/common/model-ratio.go b/common/model-ratio.go index 8f4be8c3..e088dc70 100644 --- a/common/model-ratio.go +++ b/common/model-ratio.go @@ -25,6 +25,7 @@ var ModelRatio = map[string]float64{ "gpt-3.5-turbo-16k": 1.5, // $0.003 / 1K tokens "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.0010 / 1K tokens "text-ada-001": 0.2, "text-babbage-001": 0.25, "text-curie-001": 1, @@ -99,5 +100,8 @@ func GetCompletionRatio(name string) float64 { if strings.HasPrefix(name, "claude-2") { return 2.965517 } + if strings.HasPrefix(name, "gpt-3.5-turbo-1106") { + return 2 // Input: $0.0010 / 1K tokens Output: $0.0020 / 1K tokens + } return 1 } diff --git a/controller/model.go b/controller/model.go index 2a7dc538..1d0ff566 100644 --- a/controller/model.go +++ b/controller/model.go @@ -126,6 +126,15 @@ func init() { Root: "gpt-3.5-turbo-instruct", Parent: nil, }, + { + Id: "gpt-3.5-turbo-1106", + Object: "model", + Created: 1677649963, + OwnedBy: "openai", + Permission: permission, + Root: "gpt-3.5-turbo-1106", + Parent: nil, + }, { Id: "gpt-4", Object: "model",