@ai-sdk/google
Advanced tools
+1
-1
| { | ||
| "name": "@ai-sdk/google", | ||
| "version": "4.0.0", | ||
| "version": "4.0.1", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -217,10 +217,8 @@ import { | ||
| zodSchema( | ||
| z | ||
| .object({ | ||
| displayName: z.string().nullish(), | ||
| pollIntervalMs: z.number().positive().nullish(), | ||
| pollTimeoutMs: z.number().positive().nullish(), | ||
| }) | ||
| .passthrough(), | ||
| z.looseObject({ | ||
| displayName: z.string().nullish(), | ||
| pollIntervalMs: z.number().positive().nullish(), | ||
| pollTimeoutMs: z.number().positive().nullish(), | ||
| }), | ||
| ), | ||
| ); |
@@ -24,21 +24,19 @@ import { lazySchema, zodSchema } from '@ai-sdk/provider-utils'; | ||
| zodSchema( | ||
| z | ||
| .object({ | ||
| pollIntervalMs: z.number().positive().nullish(), | ||
| pollTimeoutMs: z.number().positive().nullish(), | ||
| personGeneration: z | ||
| .enum(['dont_allow', 'allow_adult', 'allow_all']) | ||
| .nullish(), | ||
| negativePrompt: z.string().nullish(), | ||
| referenceImages: z | ||
| .array( | ||
| z.object({ | ||
| bytesBase64Encoded: z.string().nullish(), | ||
| gcsUri: z.string().nullish(), | ||
| }), | ||
| ) | ||
| .nullish(), | ||
| }) | ||
| .passthrough(), | ||
| z.looseObject({ | ||
| pollIntervalMs: z.number().positive().nullish(), | ||
| pollTimeoutMs: z.number().positive().nullish(), | ||
| personGeneration: z | ||
| .enum(['dont_allow', 'allow_adult', 'allow_all']) | ||
| .nullish(), | ||
| negativePrompt: z.string().nullish(), | ||
| referenceImages: z | ||
| .array( | ||
| z.object({ | ||
| bytesBase64Encoded: z.string().nullish(), | ||
| gcsUri: z.string().nullish(), | ||
| }), | ||
| ) | ||
| .nullish(), | ||
| }), | ||
| ), | ||
| ); |
+26
-28
@@ -9,31 +9,29 @@ import { | ||
| /** Tool to retrieve knowledge from the File Search Stores. */ | ||
| const fileSearchArgsBaseSchema = z | ||
| .object({ | ||
| /** The names of the file_search_stores to retrieve from. | ||
| * Example: `fileSearchStores/my-file-search-store-123` | ||
| */ | ||
| fileSearchStoreNames: z | ||
| .array(z.string()) | ||
| .describe( | ||
| 'The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`', | ||
| ), | ||
| /** The number of file search retrieval chunks to retrieve. */ | ||
| topK: z | ||
| .number() | ||
| .int() | ||
| .positive() | ||
| .describe('The number of file search retrieval chunks to retrieve.') | ||
| .optional(), | ||
| const fileSearchArgsBaseSchema = z.looseObject({ | ||
| /** The names of the file_search_stores to retrieve from. | ||
| * Example: `fileSearchStores/my-file-search-store-123` | ||
| */ | ||
| fileSearchStoreNames: z | ||
| .array(z.string()) | ||
| .describe( | ||
| 'The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123`', | ||
| ), | ||
| /** The number of file search retrieval chunks to retrieve. */ | ||
| topK: z | ||
| .number() | ||
| .int() | ||
| .positive() | ||
| .describe('The number of file search retrieval chunks to retrieve.') | ||
| .optional(), | ||
| /** Metadata filter to apply to the file search retrieval documents. | ||
| * See https://google.aip.dev/160 for the syntax of the filter expression. | ||
| */ | ||
| metadataFilter: z | ||
| .string() | ||
| .describe( | ||
| 'Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.', | ||
| ) | ||
| .optional(), | ||
| }) | ||
| .passthrough(); | ||
| /** Metadata filter to apply to the file search retrieval documents. | ||
| * See https://google.aip.dev/160 for the syntax of the filter expression. | ||
| */ | ||
| metadataFilter: z | ||
| .string() | ||
| .describe( | ||
| 'Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression.', | ||
| ) | ||
| .optional(), | ||
| }); | ||
@@ -40,0 +38,0 @@ export type GoogleFileSearchToolArgs = z.infer<typeof fileSearchArgsBaseSchema>; |
@@ -12,19 +12,17 @@ import { | ||
| export const googleSearchToolArgsBaseSchema = z | ||
| .object({ | ||
| searchTypes: z | ||
| .object({ | ||
| webSearch: z.object({}).optional(), | ||
| imageSearch: z.object({}).optional(), | ||
| }) | ||
| .optional(), | ||
| export const googleSearchToolArgsBaseSchema = z.looseObject({ | ||
| searchTypes: z | ||
| .object({ | ||
| webSearch: z.object({}).optional(), | ||
| imageSearch: z.object({}).optional(), | ||
| }) | ||
| .optional(), | ||
| timeRangeFilter: z | ||
| .object({ | ||
| startTime: z.string(), | ||
| endTime: z.string(), | ||
| }) | ||
| .optional(), | ||
| }) | ||
| .passthrough(); | ||
| timeRangeFilter: z | ||
| .object({ | ||
| startTime: z.string(), | ||
| endTime: z.string(), | ||
| }) | ||
| .optional(), | ||
| }); | ||
@@ -31,0 +29,0 @@ export type GoogleSearchToolArgs = z.infer< |
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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
1628765
-0.03%21701
-0.04%