We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f274683 + a4c54ca commit 3ba984dCopy full SHA for 3ba984d
app/utils.ts
@@ -292,9 +292,11 @@ export function getMessageImages(message: RequestMessage): string[] {
292
}
293
294
export function isVisionModel(model: string) {
295
- return (
296
- // model.startsWith("gpt-4-vision") ||
297
- // model.startsWith("gemini-pro-vision") ||
298
- model.includes("vision")
299
- );
+ // 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",
+ ];
300
+
301
+ return visionKeywords.some(keyword => model.includes(keyword));
302
0 commit comments