From 3554872d9a1394d04cfe6990f6842ff7c1ca6f3b Mon Sep 17 00:00:00 2001 From: Leo Li Date: Thu, 25 Jan 2024 15:09:48 -0500 Subject: [PATCH 1/3] Add gpt-4-0125-preview --- app/constant.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/constant.ts b/app/constant.ts index 53d47540ac6..af64c92dc9c 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -108,6 +108,7 @@ export const SUMMARIZE_MODEL = "gpt-3.5-turbo"; export const KnowledgeCutOffDate: Record = { default: "2021-09", "gpt-4-1106-preview": "2023-04", + "gpt-4-0125-preview": "2023-04", "gpt-4-vision-preview": "2023-04", }; @@ -175,6 +176,15 @@ export const DEFAULT_MODELS = [ providerType: "openai", }, }, + { + name: "gpt-4-0125-preview", + available: true, + provider: { + id: "openai", + providerName: "OpenAI", + providerType: "openai", + }, + }, { name: "gpt-4-vision-preview", available: true, From 6319f41b2cc22148b1d63bbc0dcc73d33dca8709 Mon Sep 17 00:00:00 2001 From: Leo Li Date: Wed, 10 Apr 2024 05:18:39 -0400 Subject: [PATCH 2/3] add new turbo --- app/constant.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/constant.ts b/app/constant.ts index 1ad76870f45..6de3b66ed92 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -127,6 +127,7 @@ export const GEMINI_SUMMARIZE_MODEL = "gemini-pro"; export const KnowledgeCutOffDate: Record = { default: "2021-09", + "gpt-4-turbo": "2023-12", "gpt-4-turbo-preview": "2023-12", "gpt-4-1106-preview": "2023-04", "gpt-4-0125-preview": "2023-12", @@ -191,6 +192,24 @@ export const DEFAULT_MODELS = [ providerType: "openai", }, }, + { + name: "gpt-4-turbo", + available: true, + provider: { + id: "openai", + providerName: "OpenAI", + providerType: "openai", + }, + }, + { + name: "gpt-4-turbo-2024-04-09", + available: true, + provider: { + id: "openai", + providerName: "OpenAI", + providerType: "openai", + }, + }, { name: "gpt-4-turbo-preview", available: true, From f101ee3c4f24396a4c091947a0f65bb44f0404a4 Mon Sep 17 00:00:00 2001 From: Leo Li Date: Wed, 10 Apr 2024 05:33:54 -0400 Subject: [PATCH 3/3] support new vision models --- app/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/utils.ts b/app/utils.ts index 2745f5ca2db..b3155697738 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -290,8 +290,8 @@ export function getMessageImages(message: RequestMessage): string[] { } export function isVisionModel(model: string) { - // Note: This is a better way using the TypeScript feature instead of `&&` or `||` (ts v5.5.0-dev.20240314 I've been using) const visionKeywords = ["vision", "claude-3"]; + const isGpt4Turbo = model.includes("gpt-4-turbo") && !model.includes("preview"); - return visionKeywords.some((keyword) => model.includes(keyword)); + return visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo; }