@ai-sdk/google
Advanced tools
+8
-0
| # @ai-sdk/google | ||
| ## 3.0.16 | ||
| ### Patch Changes | ||
| - 97b3ebb: fix (provider/google): make `segment` optional in `groundingSupports` schema | ||
| The Google Generative AI API sometimes returns grounding supports without a `segment` field. This change makes the `segment` field optional to handle these responses correctly. | ||
| ## 3.0.15 | ||
@@ -4,0 +12,0 @@ |
+2
-2
@@ -108,7 +108,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; | ||
| groundingSupports?: { | ||
| segment: { | ||
| segment?: { | ||
| startIndex?: number | null | undefined; | ||
| endIndex?: number | null | undefined; | ||
| text?: string | null | undefined; | ||
| }; | ||
| } | null | undefined; | ||
| segment_text?: string | null | undefined; | ||
@@ -115,0 +115,0 @@ groundingChunkIndices?: number[] | null | undefined; |
+2
-2
@@ -108,7 +108,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; | ||
| groundingSupports?: { | ||
| segment: { | ||
| segment?: { | ||
| startIndex?: number | null | undefined; | ||
| endIndex?: number | null | undefined; | ||
| text?: string | null | undefined; | ||
| }; | ||
| } | null | undefined; | ||
| segment_text?: string | null | undefined; | ||
@@ -115,0 +115,0 @@ groundingChunkIndices?: number[] | null | undefined; |
@@ -56,7 +56,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; | ||
| groundingSupports: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{ | ||
| segment: z.ZodObject<{ | ||
| segment: z.ZodOptional<z.ZodNullable<z.ZodObject<{ | ||
| startIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; | ||
| endIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; | ||
| text: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>>>; | ||
| segment_text: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
@@ -141,7 +141,7 @@ groundingChunkIndices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>; | ||
| groundingSupports?: { | ||
| segment: { | ||
| segment?: { | ||
| startIndex?: number | null | undefined; | ||
| endIndex?: number | null | undefined; | ||
| text?: string | null | undefined; | ||
| }; | ||
| } | null | undefined; | ||
| segment_text?: string | null | undefined; | ||
@@ -148,0 +148,0 @@ groundingChunkIndices?: number[] | null | undefined; |
@@ -56,7 +56,7 @@ import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils'; | ||
| groundingSupports: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{ | ||
| segment: z.ZodObject<{ | ||
| segment: z.ZodOptional<z.ZodNullable<z.ZodObject<{ | ||
| startIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; | ||
| endIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>; | ||
| text: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
| }, z.core.$strip>; | ||
| }, z.core.$strip>>>; | ||
| segment_text: z.ZodOptional<z.ZodNullable<z.ZodString>>; | ||
@@ -141,7 +141,7 @@ groundingChunkIndices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>; | ||
| groundingSupports?: { | ||
| segment: { | ||
| segment?: { | ||
| startIndex?: number | null | undefined; | ||
| endIndex?: number | null | undefined; | ||
| text?: string | null | undefined; | ||
| }; | ||
| } | null | undefined; | ||
| segment_text?: string | null | undefined; | ||
@@ -148,0 +148,0 @@ groundingChunkIndices?: number[] | null | undefined; |
@@ -1348,3 +1348,3 @@ "use strict"; | ||
| text: import_v43.z.string().nullish() | ||
| }), | ||
| }).nullish(), | ||
| segment_text: import_v43.z.string().nullish(), | ||
@@ -1351,0 +1351,0 @@ groundingChunkIndices: import_v43.z.array(import_v43.z.number()).nullish(), |
@@ -1337,3 +1337,3 @@ // src/google-generative-ai-language-model.ts | ||
| text: z3.string().nullish() | ||
| }), | ||
| }).nullish(), | ||
| segment_text: z3.string().nullish(), | ||
@@ -1340,0 +1340,0 @@ groundingChunkIndices: z3.array(z3.number()).nullish(), |
+1
-1
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "3.0.15", | ||
| "version": "3.0.16", | ||
| "license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -843,7 +843,9 @@ import { | ||
| z.object({ | ||
| segment: z.object({ | ||
| startIndex: z.number().nullish(), | ||
| endIndex: z.number().nullish(), | ||
| text: z.string().nullish(), | ||
| }), | ||
| segment: z | ||
| .object({ | ||
| startIndex: z.number().nullish(), | ||
| endIndex: z.number().nullish(), | ||
| text: z.string().nullish(), | ||
| }) | ||
| .nullish(), | ||
| segment_text: z.string().nullish(), | ||
@@ -850,0 +852,0 @@ groundingChunkIndices: z.array(z.number()).nullish(), |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
955837
0.08%10393
0.02%