|
|
@@ -254,6 +254,7 @@ 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 excludeKeywords = ["claude-3-5-haiku-20241022"];
|
|
|
const visionKeywords = [
|
|
|
"vision",
|
|
|
"claude-3",
|
|
|
@@ -266,9 +267,10 @@ export function isVisionModel(model: string) {
|
|
|
model.includes("gpt-4-turbo") && !model.includes("preview");
|
|
|
|
|
|
return (
|
|
|
- visionKeywords.some((keyword) => model.includes(keyword)) ||
|
|
|
- isGpt4Turbo ||
|
|
|
- isDalle3(model)
|
|
|
+ !excludeKeywords.some((keyword) => model.includes(keyword)) &&
|
|
|
+ (visionKeywords.some((keyword) => model.includes(keyword)) ||
|
|
|
+ isGpt4Turbo ||
|
|
|
+ isDalle3(model))
|
|
|
);
|
|
|
}
|
|
|
|