mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 20:20:16 +09:00
Merge pull request #4703 from ChatGPTNextWeb/feat/gemini-flash
feat: add gemini flash into vision model list
This commit is contained in:
commit
1e00c89988
11
app/utils.ts
11
app/utils.ts
@ -290,17 +290,18 @@ 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)
|
||||||
|
|
||||||
const visionKeywords = [
|
const visionKeywords = [
|
||||||
"vision",
|
"vision",
|
||||||
"claude-3",
|
"claude-3",
|
||||||
"gemini-1.5-pro",
|
"gemini-1.5-pro",
|
||||||
"gpt-4-turbo",
|
"gemini-1.5-flash",
|
||||||
"gpt-4o",
|
|
||||||
];
|
];
|
||||||
const isGpt4TurboPreview = model === "gpt-4-turbo-preview";
|
const isGpt4Turbo =
|
||||||
|
model.includes("gpt-4-turbo") && !model.includes("preview");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
visionKeywords.some((keyword) => model.includes(keyword)) &&
|
visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo
|
||||||
!isGpt4TurboPreview
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user