From 4789a7f6a93cb7c271755a201d04523de246bbec Mon Sep 17 00:00:00 2001 From: Fred Date: Wed, 15 May 2024 15:42:06 +0800 Subject: [PATCH] feat: add gemini flash into vision model list --- app/utils.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/utils.ts b/app/utils.ts index 07d0dcb13cc..0007e2b6123 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -290,16 +290,19 @@ 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", "gemini-1.5-pro", + "gemini-1.5-flash", ]; - const isGpt4Turbo = model.includes("gpt-4-turbo") && !model.includes("preview"); + const isGpt4Turbo = + model.includes("gpt-4-turbo") && !model.includes("preview"); - return visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo; + return ( + visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo + ); }