mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-03 00:26:40 +08:00
Merge remote-tracking branch 'upstream/main' into dev
# Conflicts: # app/utils.ts # package.json # yarn.lock
This commit is contained in:
commit
8dc76ac212
@ -134,6 +134,8 @@ export const KnowledgeCutOffDate: Record<string, string> = {
|
|||||||
"gpt-4-turbo": "2023-12",
|
"gpt-4-turbo": "2023-12",
|
||||||
"gpt-4-turbo-2024-04-09": "2023-12",
|
"gpt-4-turbo-2024-04-09": "2023-12",
|
||||||
"gpt-4-turbo-preview": "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",
|
"gpt-4-vision-preview": "2023-04",
|
||||||
// After improvements,
|
// After improvements,
|
||||||
// it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously.
|
// it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously.
|
||||||
@ -151,6 +153,8 @@ const openaiModels = [
|
|||||||
"gpt-4-32k-0613",
|
"gpt-4-32k-0613",
|
||||||
"gpt-4-turbo",
|
"gpt-4-turbo",
|
||||||
"gpt-4-turbo-preview",
|
"gpt-4-turbo-preview",
|
||||||
|
"gpt-4o",
|
||||||
|
"gpt-4o-2024-05-13",
|
||||||
"gpt-4-vision-preview",
|
"gpt-4-vision-preview",
|
||||||
"gpt-4-turbo-2024-04-09",
|
"gpt-4-turbo-2024-04-09",
|
||||||
];
|
];
|
||||||
|
@ -336,7 +336,7 @@ const en: LocaleType = {
|
|||||||
|
|
||||||
Endpoint: {
|
Endpoint: {
|
||||||
Title: "OpenAI Endpoint",
|
Title: "OpenAI Endpoint",
|
||||||
SubTitle: "Must starts with http(s):// or use /api/openai as default",
|
SubTitle: "Must start with http(s):// or use /api/openai as default",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Azure: {
|
Azure: {
|
||||||
|
15
app/utils.ts
15
app/utils.ts
@ -292,12 +292,17 @@ export function getMessageImages(message: RequestMessage): string[] {
|
|||||||
export function isVisionModel(model: 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)
|
// 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",
|
||||||
const isGpt4Turbo =
|
"claude-3",
|
||||||
model.includes("gpt-4-turbo") && !model.includes("preview");
|
"gemini-1.5-pro",
|
||||||
|
"gpt-4-turbo",
|
||||||
|
"gpt-4o",
|
||||||
|
];
|
||||||
|
const isGpt4TurboPreview = model === "gpt-4-turbo-preview";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo
|
visionKeywords.some((keyword) => model.includes(keyword)) &&
|
||||||
|
!isGpt4TurboPreview
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "NextChat",
|
"productName": "NextChat",
|
||||||
"version": "2.12.2"
|
"version": "2.12.3"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
@ -112,4 +112,4 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user