Skip to content

Commit

Permalink
Merge branch 'main' into chore-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-bf committed May 16, 2024
2 parents fffbee8 + bffd9d9 commit 48d44ec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
7 changes: 6 additions & 1 deletion app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,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,
// it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously.
Expand All @@ -144,13 +146,16 @@ const openaiModels = [
"gpt-4-32k-0613",
"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 = [
"gemini-1.0-pro",
"gemini-1.5-pro-latest",
"gemini-1.5-flash-latest",
"gemini-pro-vision",
];

Expand Down
9 changes: 7 additions & 2 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,13 @@ 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"];

const visionKeywords = [
"vision",
"claude-3",
"gemini-1.5-pro",
"gemini-1.5-flash",
"gpt-4o",
];
const isGpt4Turbo =
model.includes("gpt-4-turbo") && !model.includes("preview");

Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"package": {
"productName": "NextChat",
"version": "2.12.2"
"version": "2.12.3"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -112,4 +112,4 @@
}
]
}
}
}

0 comments on commit 48d44ec

Please sign in to comment.