From 66707736f905e7c543558e198f027f04db7d9e67 Mon Sep 17 00:00:00 2001 From: Zhang Minghan Date: Fri, 2 Feb 2024 09:03:41 +0800 Subject: [PATCH] feat: support gpt-3.5-turbo-0125 model --- app/src/admin/channel.ts | 2 ++ app/src/admin/colors.ts | 1 + globals/variables.go | 1 + utils/tokenizer.go | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/admin/channel.ts b/app/src/admin/channel.ts index 7dc41822..eea9aa65 100644 --- a/app/src/admin/channel.ts +++ b/app/src/admin/channel.ts @@ -48,6 +48,7 @@ export const ChannelInfos: Record = { "gpt-3.5-turbo-0613", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613", "gpt-3.5-turbo-16k-0301", @@ -80,6 +81,7 @@ export const ChannelInfos: Record = { "gpt-3.5-turbo-0613", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-1106", + "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-16k-0613", "gpt-3.5-turbo-16k-0301", diff --git a/app/src/admin/colors.ts b/app/src/admin/colors.ts index 13efaa88..e893e1ff 100644 --- a/app/src/admin/colors.ts +++ b/app/src/admin/colors.ts @@ -4,6 +4,7 @@ export const modelColorMapper: Record = { "gpt-3.5-turbo-0613": "#34bf49", "gpt-3.5-turbo-0301": "#34bf49", "gpt-3.5-turbo-1106": "#11ba2b", + "gpt-3.5-turbo-0125": "#11ba2b", dalle: "#e4e5e5", "dall-e-2": "#e4e5e5", "dall-e-3": "#e4e5e5", diff --git a/globals/variables.go b/globals/variables.go index 2b8683e1..848c4bd0 100644 --- a/globals/variables.go +++ b/globals/variables.go @@ -45,6 +45,7 @@ const ( GPT3Turbo0613 = "gpt-3.5-turbo-0613" GPT3Turbo0301 = "gpt-3.5-turbo-0301" GPT3Turbo1106 = "gpt-3.5-turbo-1106" + GPT3Turbo0125 = "gpt-3.5-turbo-0125" GPT3Turbo16k = "gpt-3.5-turbo-16k" GPT3Turbo16k0613 = "gpt-3.5-turbo-16k-0613" GPT3Turbo16k0301 = "gpt-3.5-turbo-16k-0301" diff --git a/utils/tokenizer.go b/utils/tokenizer.go index badc8892..1cf290f9 100644 --- a/utils/tokenizer.go +++ b/utils/tokenizer.go @@ -16,7 +16,7 @@ func GetWeightByModel(model string) int { globals.Claude1, globals.Claude1100k, globals.Claude2, globals.Claude2100k, globals.Claude2200k: return 2 - case globals.GPT3Turbo, globals.GPT3Turbo0613, globals.GPT3Turbo1106, + case globals.GPT3Turbo, globals.GPT3Turbo0613, globals.GPT3Turbo1106, globals.GPT3Turbo0125, globals.GPT3Turbo16k, globals.GPT3Turbo16k0613, globals.GPT4, globals.GPT40314, globals.GPT40613, globals.GPT41106Preview, globals.GPT4TurboPreview, globals.GPT40125Preview,