diff --git a/app/constant.ts b/app/constant.ts index 1ad76870f45c..6de3b66ed921 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, diff --git a/app/utils.ts b/app/utils.ts index 2745f5ca2dbd..b31556977382 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; }