From 3086a2fa77d2815af05236bae4a13a4da387730b Mon Sep 17 00:00:00 2001 From: opchips Date: Wed, 6 Nov 2024 12:56:24 +0800 Subject: [PATCH 1/2] add claude35haiku not vision --- app/constant.ts | 1 + app/utils.ts | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/constant.ts b/app/constant.ts index 1d60e1ec663..d10e624cbf4 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -328,6 +328,7 @@ const anthropicModels = [ "claude-3-sonnet-20240229", "claude-3-opus-20240229", "claude-3-haiku-20240307", + "claude-3-5-haiku-20241022", "claude-3-5-sonnet-20240620", "claude-3-5-sonnet-20241022", "claude-3-5-sonnet-latest", diff --git a/app/utils.ts b/app/utils.ts index 2e1f9401607..2dd80b8a314 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -254,6 +254,7 @@ 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 excludeKeywords = ["claude-3-5-haiku-20241022"]; const visionKeywords = [ "vision", "claude-3", @@ -266,9 +267,10 @@ export function isVisionModel(model: string) { model.includes("gpt-4-turbo") && !model.includes("preview"); return ( - visionKeywords.some((keyword) => model.includes(keyword)) || - isGpt4Turbo || - isDalle3(model) + !excludeKeywords.some((keyword) => model.includes(keyword)) && + (visionKeywords.some((keyword) => model.includes(keyword)) || + isGpt4Turbo || + isDalle3(model)) ); } From 64aa760e58f31ab45ce720b988c859dd53c491ca Mon Sep 17 00:00:00 2001 From: opchips Date: Wed, 6 Nov 2024 19:18:05 +0800 Subject: [PATCH 2/2] update claude rank --- app/constant.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/constant.ts b/app/constant.ts index 296878bd76a..f1a1996b8c5 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -330,10 +330,10 @@ const anthropicModels = [ "claude-3-opus-latest", "claude-3-haiku-20240307", "claude-3-5-haiku-20241022", + "claude-3-5-haiku-latest", "claude-3-5-sonnet-20240620", "claude-3-5-sonnet-20241022", "claude-3-5-sonnet-latest", - "claude-3-5-haiku-latest", ]; const baiduModels = [