Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#4162 from fred-bf/fix/identify-visi…
Browse files Browse the repository at this point in the history
…on-model

fix: fix the method to detect vision model
  • Loading branch information
fred-bf authored Feb 28, 2024
2 parents 08fa227 + 43e5dc2 commit 8b821ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class ChatGPTApi implements LLMApi {
enumerable: true,
configurable: true,
writable: true,
value: Math.max(modelConfig.max_tokens, 4096),
value: modelConfig.max_tokens,
});
}

Expand Down
6 changes: 3 additions & 3 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ export function getMessageImages(message: RequestMessage): string[] {

export function isVisionModel(model: string) {
return (
model.startsWith("gpt-4-vision") ||
model.startsWith("gemini-pro-vision") ||
!DEFAULT_MODELS.find((m) => m.name == model)
// model.startsWith("gpt-4-vision") ||
// model.startsWith("gemini-pro-vision") ||
model.includes("vision")
);
}

0 comments on commit 8b821ac

Please sign in to comment.