@langchain/google-genai
Advanced tools
+8
-0
| # @langchain/google-genai | ||
| ## 2.1.12 | ||
| ### Patch Changes | ||
| - [#9788](https://github.com/langchain-ai/langchainjs/pull/9788) [`82080b5`](https://github.com/langchain-ai/langchainjs/commit/82080b5e6131e791113b262525ee1e9aa21298db) Thanks [@SkrOYC](https://github.com/SkrOYC)! - fix: handle "tool_call" content blocks in ChatGoogleGenerativeAI with outputVersion: "v1" | ||
| Previously, using `outputVersion: "v1"` with `ChatGoogleGenerativeAI` would throw an "Unknown content type tool_call" error when processing tool calls generated by LangChain's `AIMessage`. This fix adds a handler for the `tool_call` block type in the conversion utility, ensuring compatibility with standard LangChain tool call blocks. | ||
| ## 2.1.11 | ||
@@ -4,0 +12,0 @@ |
@@ -145,2 +145,6 @@ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs'); | ||
| } }; | ||
| else if (content.type === "tool_call") return { functionCall: { | ||
| name: content.name, | ||
| args: content.args | ||
| } }; | ||
| else if (content.type?.includes("/") && content.type.split("/").length === 2 && "data" in content && typeof content.data === "string") return { inlineData: { | ||
@@ -147,0 +151,0 @@ mimeType: content.type, |
@@ -144,2 +144,6 @@ import { jsonSchemaToGeminiParameters, schemaToGenerativeAIParameters } from "./zod_to_genai_parameters.js"; | ||
| } }; | ||
| else if (content.type === "tool_call") return { functionCall: { | ||
| name: content.name, | ||
| args: content.args | ||
| } }; | ||
| else if (content.type?.includes("/") && content.type.split("/").length === 2 && "data" in content && typeof content.data === "string") return { inlineData: { | ||
@@ -146,0 +150,0 @@ mimeType: content.type, |
+1
-1
| { | ||
| "name": "@langchain/google-genai", | ||
| "version": "2.1.11", | ||
| "version": "2.1.12", | ||
| "description": "Google Generative AI integration for LangChain.js", | ||
@@ -5,0 +5,0 @@ "author": "LangChain", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
486463
0.28%4154
0.19%