Skip to content

Commit

Permalink
fix(google-genai): Update multimodal model check to include gemini-2 …
Browse files Browse the repository at this point in the history
…support (#7389)

Co-authored-by: jacoblee93 <[email protected]>
  • Loading branch information
OlegIvaniv and jacoblee93 authored Dec 19, 2024
1 parent 82cecae commit 9d6b434
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libs/langchain-google-genai/src/chat_models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,11 @@ export class ChatGoogleGenerativeAI
private client: GenerativeModel;

get _isMultimodalModel() {
return this.model.includes("vision") || this.model.startsWith("gemini-1.5");
return (
this.model.includes("vision") ||
this.model.startsWith("gemini-1.5") ||
this.model.startsWith("gemini-2")
);
}

constructor(fields?: GoogleGenerativeAIChatInput) {
Expand Down

0 comments on commit 9d6b434

Please sign in to comment.