mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-09-13 22:56:56 +08:00
Merge remote-tracking branch 'origin/main' into feat-redesign-ui
This commit is contained in:
12
app/utils.ts
12
app/utils.ts
@@ -291,10 +291,18 @@ 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"];
|
||||
|
||||
return visionKeywords.some((keyword) => model.includes(keyword));
|
||||
const visionKeywords = [
|
||||
"vision",
|
||||
"claude-3",
|
||||
"gemini-1.5-pro",
|
||||
];
|
||||
|
||||
const isGpt4Turbo = model.includes("gpt-4-turbo") && !model.includes("preview");
|
||||
|
||||
return visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo;
|
||||
}
|
||||
|
||||
export function getTime(dateTime: string) {
|
||||
|
Reference in New Issue
Block a user