From f101ee3c4f24396a4c091947a0f65bb44f0404a4 Mon Sep 17 00:00:00 2001 From: Leo Li Date: Wed, 10 Apr 2024 05:33:54 -0400 Subject: [PATCH] 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 2745f5ca2..b31556977 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; }