Merge branch 'main' into chore-fix

This commit is contained in:
fred-bf
2024-05-16 14:13:28 +08:00
committed by GitHub
3 changed files with 15 additions and 5 deletions

View File

@@ -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");