Skip to content

Commit

Permalink
support new vision models
Browse files Browse the repository at this point in the history
  • Loading branch information
leo4life2 committed Apr 10, 2024
1 parent 6319f41 commit f101ee3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ 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"];
const isGpt4Turbo = model.includes("gpt-4-turbo") && !model.includes("preview");

return visionKeywords.some((keyword) => model.includes(keyword));
return visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo;
}

0 comments on commit f101ee3

Please sign in to comment.