@ai-sdk/google
Advanced tools
+9
-2
| # @ai-sdk/google | ||
| ## 2.0.53 | ||
| ### Patch Changes | ||
| - Updated dependencies [20565b8] | ||
| - @ai-sdk/provider-utils@3.0.21 | ||
| ## 2.0.52 | ||
@@ -7,4 +14,4 @@ | ||
| - 4953414: fix: trigger new release for `@ai-v5` dist-tag | ||
| - Updated dependencies [4953414] | ||
| - 526fe8d: fix: trigger new release for `@ai-v5` dist-tag | ||
| - Updated dependencies [526fe8d] | ||
| - @ai-sdk/provider@2.0.1 | ||
@@ -11,0 +18,0 @@ - @ai-sdk/provider-utils@3.0.20 |
+36
-24
@@ -851,8 +851,18 @@ "use strict"; | ||
| lastCodeExecutionToolCallId = void 0; | ||
| } else if ("text" in part && part.text != null && part.text.length > 0) { | ||
| content.push({ | ||
| type: part.thought === true ? "reasoning" : "text", | ||
| text: part.text, | ||
| providerMetadata: part.thoughtSignature ? { google: { thoughtSignature: part.thoughtSignature } } : void 0 | ||
| }); | ||
| } else if ("text" in part && part.text != null) { | ||
| const thoughtSignatureMetadata = part.thoughtSignature ? { google: { thoughtSignature: part.thoughtSignature } } : void 0; | ||
| if (part.text.length === 0) { | ||
| if (thoughtSignatureMetadata != null && content.length > 0) { | ||
| const lastContent = content[content.length - 1]; | ||
| if (lastContent.type !== "file") { | ||
| lastContent.providerMetadata = thoughtSignatureMetadata; | ||
| } | ||
| } | ||
| } else { | ||
| content.push({ | ||
| type: part.thought === true ? "reasoning" : "text", | ||
| text: part.text, | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
| } | ||
| } else if ("functionCall" in part) { | ||
@@ -1014,4 +1024,18 @@ content.push({ | ||
| } | ||
| } else if ("text" in part && part.text != null && part.text.length > 0) { | ||
| if (part.thought === true) { | ||
| } else if ("text" in part && part.text != null) { | ||
| const thoughtSignatureMetadata = part.thoughtSignature ? { | ||
| google: { | ||
| thoughtSignature: part.thoughtSignature | ||
| } | ||
| } : void 0; | ||
| if (part.text.length === 0) { | ||
| if (thoughtSignatureMetadata != null && currentTextBlockId !== null) { | ||
| controller.enqueue({ | ||
| type: "text-delta", | ||
| id: currentTextBlockId, | ||
| delta: "", | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
| } | ||
| } else if (part.thought === true) { | ||
| if (currentTextBlockId !== null) { | ||
@@ -1029,7 +1053,3 @@ controller.enqueue({ | ||
| id: currentReasoningBlockId, | ||
| providerMetadata: part.thoughtSignature ? { | ||
| google: { | ||
| thoughtSignature: part.thoughtSignature | ||
| } | ||
| } : void 0 | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
@@ -1041,5 +1061,3 @@ } | ||
| delta: part.text, | ||
| providerMetadata: part.thoughtSignature ? { | ||
| google: { thoughtSignature: part.thoughtSignature } | ||
| } : void 0 | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
@@ -1059,7 +1077,3 @@ } else { | ||
| id: currentTextBlockId, | ||
| providerMetadata: part.thoughtSignature ? { | ||
| google: { | ||
| thoughtSignature: part.thoughtSignature | ||
| } | ||
| } : void 0 | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
@@ -1071,5 +1085,3 @@ } | ||
| delta: part.text, | ||
| providerMetadata: part.thoughtSignature ? { | ||
| google: { thoughtSignature: part.thoughtSignature } | ||
| } : void 0 | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
@@ -1076,0 +1088,0 @@ } |
+36
-24
@@ -843,8 +843,18 @@ // src/google-generative-ai-language-model.ts | ||
| lastCodeExecutionToolCallId = void 0; | ||
| } else if ("text" in part && part.text != null && part.text.length > 0) { | ||
| content.push({ | ||
| type: part.thought === true ? "reasoning" : "text", | ||
| text: part.text, | ||
| providerMetadata: part.thoughtSignature ? { google: { thoughtSignature: part.thoughtSignature } } : void 0 | ||
| }); | ||
| } else if ("text" in part && part.text != null) { | ||
| const thoughtSignatureMetadata = part.thoughtSignature ? { google: { thoughtSignature: part.thoughtSignature } } : void 0; | ||
| if (part.text.length === 0) { | ||
| if (thoughtSignatureMetadata != null && content.length > 0) { | ||
| const lastContent = content[content.length - 1]; | ||
| if (lastContent.type !== "file") { | ||
| lastContent.providerMetadata = thoughtSignatureMetadata; | ||
| } | ||
| } | ||
| } else { | ||
| content.push({ | ||
| type: part.thought === true ? "reasoning" : "text", | ||
| text: part.text, | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
| } | ||
| } else if ("functionCall" in part) { | ||
@@ -1006,4 +1016,18 @@ content.push({ | ||
| } | ||
| } else if ("text" in part && part.text != null && part.text.length > 0) { | ||
| if (part.thought === true) { | ||
| } else if ("text" in part && part.text != null) { | ||
| const thoughtSignatureMetadata = part.thoughtSignature ? { | ||
| google: { | ||
| thoughtSignature: part.thoughtSignature | ||
| } | ||
| } : void 0; | ||
| if (part.text.length === 0) { | ||
| if (thoughtSignatureMetadata != null && currentTextBlockId !== null) { | ||
| controller.enqueue({ | ||
| type: "text-delta", | ||
| id: currentTextBlockId, | ||
| delta: "", | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
| } | ||
| } else if (part.thought === true) { | ||
| if (currentTextBlockId !== null) { | ||
@@ -1021,7 +1045,3 @@ controller.enqueue({ | ||
| id: currentReasoningBlockId, | ||
| providerMetadata: part.thoughtSignature ? { | ||
| google: { | ||
| thoughtSignature: part.thoughtSignature | ||
| } | ||
| } : void 0 | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
@@ -1033,5 +1053,3 @@ } | ||
| delta: part.text, | ||
| providerMetadata: part.thoughtSignature ? { | ||
| google: { thoughtSignature: part.thoughtSignature } | ||
| } : void 0 | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
@@ -1051,7 +1069,3 @@ } else { | ||
| id: currentTextBlockId, | ||
| providerMetadata: part.thoughtSignature ? { | ||
| google: { | ||
| thoughtSignature: part.thoughtSignature | ||
| } | ||
| } : void 0 | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
@@ -1063,5 +1077,3 @@ } | ||
| delta: part.text, | ||
| providerMetadata: part.thoughtSignature ? { | ||
| google: { thoughtSignature: part.thoughtSignature } | ||
| } : void 0 | ||
| providerMetadata: thoughtSignatureMetadata | ||
| }); | ||
@@ -1068,0 +1080,0 @@ } |
+2
-2
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "2.0.52", | ||
| "version": "2.0.53", | ||
| "license": "Apache-2.0", | ||
@@ -30,3 +30,3 @@ "sideEffects": false, | ||
| "@ai-sdk/provider": "2.0.1", | ||
| "@ai-sdk/provider-utils": "3.0.20" | ||
| "@ai-sdk/provider-utils": "3.0.21" | ||
| }, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
800241
0.46%7511
0.64%+ Added
- Removed