Merge remote-tracking branch 'upstream/main'

This commit is contained in:
DirkSchlossmacher 2024-05-14 14:54:01 +02:00
commit 5a19f6745a
3 changed files with 14 additions and 12 deletions

View File

@ -128,6 +128,8 @@ export const KnowledgeCutOffDate: Record<string, string> = {
"gpt-4-turbo": "2023-12",
"gpt-4-turbo-2024-04-09": "2023-12",
"gpt-4-turbo-preview": "2023-12",
"gpt-4o": "2023-10",
"gpt-4o-2024-05-13": "2023-10",
"gpt-4-vision-preview": "2023-04",
// After improvements,
@ -144,11 +146,12 @@ const openaiModels = [
// "gpt-4-0613",
"gpt-4-32k",
// "gpt-4-32k-0613",
"gpt-4o",
// "gpt-4-turbo",
"gpt-4-turbo",
// "gpt-4-turbo-preview",
"gpt-4o",
// "gpt-4o-2024-05-13",
// "gpt-4-vision-preview",
// "gpt-4-turbo-2024-04-09",
// "gpt-4-turbo-2024-04-09"
];
const googleModels = [

View File

@ -290,18 +290,17 @@ 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",
"gpt-4-turbo",
"gpt-4o",
"gpt-4-turbo-2024-04-09",
];
const isGpt4TurboPreview = model === "gpt-4-turbo-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)) &&
!isGpt4TurboPreview
);
}

View File

@ -9,7 +9,7 @@
},
"package": {
"productName": "NextChat",
"version": "2.12.2"
"version": "2.12.3"
},
"tauri": {
"allowlist": {
@ -112,4 +112,4 @@
}
]
}
}
}