@ai-sdk/google 2.0.0-beta.1 → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.d.mts +56 -289
- package/dist/index.d.ts +56 -289
- package/dist/index.js +101 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -6
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +18 -162
- package/dist/internal/index.d.ts +18 -162
- package/dist/internal/index.js +94 -87
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +11 -4
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# @ai-sdk/google
|
2
2
|
|
3
|
+
## 2.0.0-beta.3
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- cb787ac: fix: remove non-functional models
|
8
|
+
- d1a034f: feature: using Zod 4 for internal stuff
|
9
|
+
- Updated dependencies [0571b98]
|
10
|
+
- Updated dependencies [39a4fab]
|
11
|
+
- Updated dependencies [d1a034f]
|
12
|
+
- @ai-sdk/provider-utils@3.0.0-beta.2
|
13
|
+
|
14
|
+
## 2.0.0-beta.2
|
15
|
+
|
16
|
+
### Patch Changes
|
17
|
+
|
18
|
+
- a313780: fix: omit system message for gemma models
|
19
|
+
|
3
20
|
## 2.0.0-beta.1
|
4
21
|
|
5
22
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { z } from 'zod';
|
1
|
+
import { z } from 'zod/v4';
|
2
2
|
import { ProviderV2, LanguageModelV2, EmbeddingModelV2 } from '@ai-sdk/provider';
|
3
3
|
import { FetchFunction } from '@ai-sdk/provider-utils';
|
4
4
|
|
@@ -7,311 +7,92 @@ declare const googleErrorDataSchema: z.ZodObject<{
|
|
7
7
|
code: z.ZodNullable<z.ZodNumber>;
|
8
8
|
message: z.ZodString;
|
9
9
|
status: z.ZodString;
|
10
|
-
},
|
11
|
-
|
12
|
-
message: string;
|
13
|
-
status: string;
|
14
|
-
}, {
|
15
|
-
code: number | null;
|
16
|
-
message: string;
|
17
|
-
status: string;
|
18
|
-
}>;
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
20
|
-
error: {
|
21
|
-
code: number | null;
|
22
|
-
message: string;
|
23
|
-
status: string;
|
24
|
-
};
|
25
|
-
}, {
|
26
|
-
error: {
|
27
|
-
code: number | null;
|
28
|
-
message: string;
|
29
|
-
status: string;
|
30
|
-
};
|
31
|
-
}>;
|
10
|
+
}, z.core.$strip>;
|
11
|
+
}, z.core.$strip>;
|
32
12
|
type GoogleErrorData = z.infer<typeof googleErrorDataSchema>;
|
33
13
|
|
34
|
-
type GoogleGenerativeAIModelId = 'gemini-1.5-flash' | 'gemini-1.5-flash-latest' | 'gemini-1.5-flash-001' | 'gemini-1.5-flash-002' | 'gemini-1.5-flash-8b' | 'gemini-1.5-flash-8b-latest' | 'gemini-1.5-flash-8b-001' | 'gemini-1.5-pro' | 'gemini-1.5-pro-latest' | 'gemini-1.5-pro-001' | 'gemini-1.5-pro-002' | 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-live-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash-thinking-exp-01-21' | 'gemini-2.0-flash-exp' | 'gemini-2.5-pro-exp-03-25' | 'gemini-2.5-flash-preview-04-17' | 'gemini-exp-1206' | 'gemma-3-
|
14
|
+
type GoogleGenerativeAIModelId = 'gemini-1.5-flash' | 'gemini-1.5-flash-latest' | 'gemini-1.5-flash-001' | 'gemini-1.5-flash-002' | 'gemini-1.5-flash-8b' | 'gemini-1.5-flash-8b-latest' | 'gemini-1.5-flash-8b-001' | 'gemini-1.5-pro' | 'gemini-1.5-pro-latest' | 'gemini-1.5-pro-001' | 'gemini-1.5-pro-002' | 'gemini-2.0-flash' | 'gemini-2.0-flash-001' | 'gemini-2.0-flash-live-001' | 'gemini-2.0-flash-lite' | 'gemini-2.0-pro-exp-02-05' | 'gemini-2.0-flash-thinking-exp-01-21' | 'gemini-2.0-flash-exp' | 'gemini-2.5-pro-exp-03-25' | 'gemini-2.5-flash-preview-04-17' | 'gemini-exp-1206' | 'gemma-3-12b-it' | 'gemma-3-27b-it' | (string & {});
|
35
15
|
declare const googleGenerativeAIProviderOptions: z.ZodObject<{
|
36
|
-
responseModalities: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
16
|
+
responseModalities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
17
|
+
TEXT: "TEXT";
|
18
|
+
IMAGE: "IMAGE";
|
19
|
+
}>>>;
|
37
20
|
thinkingConfig: z.ZodOptional<z.ZodObject<{
|
38
21
|
thinkingBudget: z.ZodOptional<z.ZodNumber>;
|
39
22
|
includeThoughts: z.ZodOptional<z.ZodBoolean>;
|
40
|
-
},
|
41
|
-
thinkingBudget?: number | undefined;
|
42
|
-
includeThoughts?: boolean | undefined;
|
43
|
-
}, {
|
44
|
-
thinkingBudget?: number | undefined;
|
45
|
-
includeThoughts?: boolean | undefined;
|
46
|
-
}>>;
|
47
|
-
/**
|
48
|
-
Optional.
|
49
|
-
The name of the cached content used as context to serve the prediction.
|
50
|
-
Format: cachedContents/{cachedContent}
|
51
|
-
*/
|
23
|
+
}, z.core.$strip>>;
|
52
24
|
cachedContent: z.ZodOptional<z.ZodString>;
|
53
|
-
/**
|
54
|
-
* Optional. Enable structured output. Default is true.
|
55
|
-
*
|
56
|
-
* This is useful when the JSON Schema contains elements that are
|
57
|
-
* not supported by the OpenAPI schema version that
|
58
|
-
* Google Generative AI uses. You can use this to disable
|
59
|
-
* structured outputs if you need to.
|
60
|
-
*/
|
61
25
|
structuredOutputs: z.ZodOptional<z.ZodBoolean>;
|
62
|
-
/**
|
63
|
-
Optional. A list of unique safety settings for blocking unsafe content.
|
64
|
-
*/
|
65
26
|
safetySettings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
66
|
-
category: z.ZodEnum<
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
27
|
+
category: z.ZodEnum<{
|
28
|
+
HARM_CATEGORY_UNSPECIFIED: "HARM_CATEGORY_UNSPECIFIED";
|
29
|
+
HARM_CATEGORY_HATE_SPEECH: "HARM_CATEGORY_HATE_SPEECH";
|
30
|
+
HARM_CATEGORY_DANGEROUS_CONTENT: "HARM_CATEGORY_DANGEROUS_CONTENT";
|
31
|
+
HARM_CATEGORY_HARASSMENT: "HARM_CATEGORY_HARASSMENT";
|
32
|
+
HARM_CATEGORY_SEXUALLY_EXPLICIT: "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
33
|
+
HARM_CATEGORY_CIVIC_INTEGRITY: "HARM_CATEGORY_CIVIC_INTEGRITY";
|
34
|
+
}>;
|
35
|
+
threshold: z.ZodEnum<{
|
36
|
+
HARM_BLOCK_THRESHOLD_UNSPECIFIED: "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
|
37
|
+
BLOCK_LOW_AND_ABOVE: "BLOCK_LOW_AND_ABOVE";
|
38
|
+
BLOCK_MEDIUM_AND_ABOVE: "BLOCK_MEDIUM_AND_ABOVE";
|
39
|
+
BLOCK_ONLY_HIGH: "BLOCK_ONLY_HIGH";
|
40
|
+
BLOCK_NONE: "BLOCK_NONE";
|
41
|
+
OFF: "OFF";
|
42
|
+
}>;
|
43
|
+
}, z.core.$strip>>>;
|
44
|
+
threshold: z.ZodOptional<z.ZodEnum<{
|
45
|
+
HARM_BLOCK_THRESHOLD_UNSPECIFIED: "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
|
46
|
+
BLOCK_LOW_AND_ABOVE: "BLOCK_LOW_AND_ABOVE";
|
47
|
+
BLOCK_MEDIUM_AND_ABOVE: "BLOCK_MEDIUM_AND_ABOVE";
|
48
|
+
BLOCK_ONLY_HIGH: "BLOCK_ONLY_HIGH";
|
49
|
+
BLOCK_NONE: "BLOCK_NONE";
|
50
|
+
OFF: "OFF";
|
51
|
+
}>>;
|
81
52
|
audioTimestamp: z.ZodOptional<z.ZodBoolean>;
|
82
|
-
/**
|
83
|
-
Optional. When enabled, the model will use Google search to ground the response.
|
84
|
-
|
85
|
-
@see https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/overview
|
86
|
-
*/
|
87
53
|
useSearchGrounding: z.ZodOptional<z.ZodBoolean>;
|
88
|
-
/**
|
89
|
-
Optional. Specifies the dynamic retrieval configuration.
|
90
|
-
|
91
|
-
@note Dynamic retrieval is only compatible with Gemini 1.5 Flash.
|
92
|
-
|
93
|
-
@see https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/ground-with-google-search#dynamic-retrieval
|
94
|
-
*/
|
95
54
|
dynamicRetrievalConfig: z.ZodOptional<z.ZodObject<{
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
/**
|
101
|
-
* The threshold to be used in dynamic retrieval. If not set, a system default
|
102
|
-
* value is used.
|
103
|
-
*/
|
55
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
56
|
+
MODE_UNSPECIFIED: "MODE_UNSPECIFIED";
|
57
|
+
MODE_DYNAMIC: "MODE_DYNAMIC";
|
58
|
+
}>>;
|
104
59
|
dynamicThreshold: z.ZodOptional<z.ZodNumber>;
|
105
|
-
},
|
106
|
-
|
107
|
-
dynamicThreshold?: number | undefined;
|
108
|
-
}, {
|
109
|
-
mode?: "MODE_UNSPECIFIED" | "MODE_DYNAMIC" | undefined;
|
110
|
-
dynamicThreshold?: number | undefined;
|
111
|
-
}>>;
|
112
|
-
}, "strip", z.ZodTypeAny, {
|
113
|
-
responseModalities?: ("TEXT" | "IMAGE")[] | undefined;
|
114
|
-
thinkingConfig?: {
|
115
|
-
thinkingBudget?: number | undefined;
|
116
|
-
includeThoughts?: boolean | undefined;
|
117
|
-
} | undefined;
|
118
|
-
cachedContent?: string | undefined;
|
119
|
-
structuredOutputs?: boolean | undefined;
|
120
|
-
threshold?: "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF" | undefined;
|
121
|
-
safetySettings?: {
|
122
|
-
category: "HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY";
|
123
|
-
threshold: "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF";
|
124
|
-
}[] | undefined;
|
125
|
-
audioTimestamp?: boolean | undefined;
|
126
|
-
useSearchGrounding?: boolean | undefined;
|
127
|
-
dynamicRetrievalConfig?: {
|
128
|
-
mode?: "MODE_UNSPECIFIED" | "MODE_DYNAMIC" | undefined;
|
129
|
-
dynamicThreshold?: number | undefined;
|
130
|
-
} | undefined;
|
131
|
-
}, {
|
132
|
-
responseModalities?: ("TEXT" | "IMAGE")[] | undefined;
|
133
|
-
thinkingConfig?: {
|
134
|
-
thinkingBudget?: number | undefined;
|
135
|
-
includeThoughts?: boolean | undefined;
|
136
|
-
} | undefined;
|
137
|
-
cachedContent?: string | undefined;
|
138
|
-
structuredOutputs?: boolean | undefined;
|
139
|
-
threshold?: "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF" | undefined;
|
140
|
-
safetySettings?: {
|
141
|
-
category: "HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_CIVIC_INTEGRITY";
|
142
|
-
threshold: "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF";
|
143
|
-
}[] | undefined;
|
144
|
-
audioTimestamp?: boolean | undefined;
|
145
|
-
useSearchGrounding?: boolean | undefined;
|
146
|
-
dynamicRetrievalConfig?: {
|
147
|
-
mode?: "MODE_UNSPECIFIED" | "MODE_DYNAMIC" | undefined;
|
148
|
-
dynamicThreshold?: number | undefined;
|
149
|
-
} | undefined;
|
150
|
-
}>;
|
60
|
+
}, z.core.$strip>>;
|
61
|
+
}, z.core.$strip>;
|
151
62
|
type GoogleGenerativeAIProviderOptions = z.infer<typeof googleGenerativeAIProviderOptions>;
|
152
63
|
|
153
64
|
declare const groundingMetadataSchema: z.ZodObject<{
|
154
|
-
webSearchQueries: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString
|
155
|
-
retrievalQueries: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString
|
65
|
+
webSearchQueries: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
66
|
+
retrievalQueries: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
156
67
|
searchEntryPoint: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
157
68
|
renderedContent: z.ZodString;
|
158
|
-
},
|
159
|
-
renderedContent: string;
|
160
|
-
}, {
|
161
|
-
renderedContent: string;
|
162
|
-
}>>>;
|
69
|
+
}, z.core.$strip>>>;
|
163
70
|
groundingChunks: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
164
71
|
web: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
165
72
|
uri: z.ZodString;
|
166
73
|
title: z.ZodString;
|
167
|
-
},
|
168
|
-
uri: string;
|
169
|
-
title: string;
|
170
|
-
}, {
|
171
|
-
uri: string;
|
172
|
-
title: string;
|
173
|
-
}>>>;
|
74
|
+
}, z.core.$strip>>>;
|
174
75
|
retrievedContext: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
175
76
|
uri: z.ZodString;
|
176
77
|
title: z.ZodString;
|
177
|
-
},
|
178
|
-
|
179
|
-
title: string;
|
180
|
-
}, {
|
181
|
-
uri: string;
|
182
|
-
title: string;
|
183
|
-
}>>>;
|
184
|
-
}, "strip", z.ZodTypeAny, {
|
185
|
-
web?: {
|
186
|
-
uri: string;
|
187
|
-
title: string;
|
188
|
-
} | null | undefined;
|
189
|
-
retrievedContext?: {
|
190
|
-
uri: string;
|
191
|
-
title: string;
|
192
|
-
} | null | undefined;
|
193
|
-
}, {
|
194
|
-
web?: {
|
195
|
-
uri: string;
|
196
|
-
title: string;
|
197
|
-
} | null | undefined;
|
198
|
-
retrievedContext?: {
|
199
|
-
uri: string;
|
200
|
-
title: string;
|
201
|
-
} | null | undefined;
|
202
|
-
}>, "many">>>;
|
78
|
+
}, z.core.$strip>>>;
|
79
|
+
}, z.core.$strip>>>>;
|
203
80
|
groundingSupports: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
204
81
|
segment: z.ZodObject<{
|
205
82
|
startIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
206
83
|
endIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
207
84
|
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
208
|
-
},
|
209
|
-
text?: string | null | undefined;
|
210
|
-
startIndex?: number | null | undefined;
|
211
|
-
endIndex?: number | null | undefined;
|
212
|
-
}, {
|
213
|
-
text?: string | null | undefined;
|
214
|
-
startIndex?: number | null | undefined;
|
215
|
-
endIndex?: number | null | undefined;
|
216
|
-
}>;
|
85
|
+
}, z.core.$strip>;
|
217
86
|
segment_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
218
|
-
groundingChunkIndices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber
|
219
|
-
supportChunkIndices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber
|
220
|
-
confidenceScores: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber
|
221
|
-
confidenceScore: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber
|
222
|
-
},
|
223
|
-
|
224
|
-
text?: string | null | undefined;
|
225
|
-
startIndex?: number | null | undefined;
|
226
|
-
endIndex?: number | null | undefined;
|
227
|
-
};
|
228
|
-
segment_text?: string | null | undefined;
|
229
|
-
groundingChunkIndices?: number[] | null | undefined;
|
230
|
-
supportChunkIndices?: number[] | null | undefined;
|
231
|
-
confidenceScores?: number[] | null | undefined;
|
232
|
-
confidenceScore?: number[] | null | undefined;
|
233
|
-
}, {
|
234
|
-
segment: {
|
235
|
-
text?: string | null | undefined;
|
236
|
-
startIndex?: number | null | undefined;
|
237
|
-
endIndex?: number | null | undefined;
|
238
|
-
};
|
239
|
-
segment_text?: string | null | undefined;
|
240
|
-
groundingChunkIndices?: number[] | null | undefined;
|
241
|
-
supportChunkIndices?: number[] | null | undefined;
|
242
|
-
confidenceScores?: number[] | null | undefined;
|
243
|
-
confidenceScore?: number[] | null | undefined;
|
244
|
-
}>, "many">>>;
|
245
|
-
retrievalMetadata: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
|
87
|
+
groundingChunkIndices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
88
|
+
supportChunkIndices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
89
|
+
confidenceScores: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
90
|
+
confidenceScore: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber>>>;
|
91
|
+
}, z.core.$strip>>>>;
|
92
|
+
retrievalMetadata: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodObject<{
|
246
93
|
webDynamicRetrievalScore: z.ZodNumber;
|
247
|
-
},
|
248
|
-
|
249
|
-
}, {
|
250
|
-
webDynamicRetrievalScore: number;
|
251
|
-
}>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
252
|
-
}, "strip", z.ZodTypeAny, {
|
253
|
-
webSearchQueries?: string[] | null | undefined;
|
254
|
-
retrievalQueries?: string[] | null | undefined;
|
255
|
-
searchEntryPoint?: {
|
256
|
-
renderedContent: string;
|
257
|
-
} | null | undefined;
|
258
|
-
groundingChunks?: {
|
259
|
-
web?: {
|
260
|
-
uri: string;
|
261
|
-
title: string;
|
262
|
-
} | null | undefined;
|
263
|
-
retrievedContext?: {
|
264
|
-
uri: string;
|
265
|
-
title: string;
|
266
|
-
} | null | undefined;
|
267
|
-
}[] | null | undefined;
|
268
|
-
groundingSupports?: {
|
269
|
-
segment: {
|
270
|
-
text?: string | null | undefined;
|
271
|
-
startIndex?: number | null | undefined;
|
272
|
-
endIndex?: number | null | undefined;
|
273
|
-
};
|
274
|
-
segment_text?: string | null | undefined;
|
275
|
-
groundingChunkIndices?: number[] | null | undefined;
|
276
|
-
supportChunkIndices?: number[] | null | undefined;
|
277
|
-
confidenceScores?: number[] | null | undefined;
|
278
|
-
confidenceScore?: number[] | null | undefined;
|
279
|
-
}[] | null | undefined;
|
280
|
-
retrievalMetadata?: {
|
281
|
-
webDynamicRetrievalScore: number;
|
282
|
-
} | {} | null | undefined;
|
283
|
-
}, {
|
284
|
-
webSearchQueries?: string[] | null | undefined;
|
285
|
-
retrievalQueries?: string[] | null | undefined;
|
286
|
-
searchEntryPoint?: {
|
287
|
-
renderedContent: string;
|
288
|
-
} | null | undefined;
|
289
|
-
groundingChunks?: {
|
290
|
-
web?: {
|
291
|
-
uri: string;
|
292
|
-
title: string;
|
293
|
-
} | null | undefined;
|
294
|
-
retrievedContext?: {
|
295
|
-
uri: string;
|
296
|
-
title: string;
|
297
|
-
} | null | undefined;
|
298
|
-
}[] | null | undefined;
|
299
|
-
groundingSupports?: {
|
300
|
-
segment: {
|
301
|
-
text?: string | null | undefined;
|
302
|
-
startIndex?: number | null | undefined;
|
303
|
-
endIndex?: number | null | undefined;
|
304
|
-
};
|
305
|
-
segment_text?: string | null | undefined;
|
306
|
-
groundingChunkIndices?: number[] | null | undefined;
|
307
|
-
supportChunkIndices?: number[] | null | undefined;
|
308
|
-
confidenceScores?: number[] | null | undefined;
|
309
|
-
confidenceScore?: number[] | null | undefined;
|
310
|
-
}[] | null | undefined;
|
311
|
-
retrievalMetadata?: {
|
312
|
-
webDynamicRetrievalScore: number;
|
313
|
-
} | {} | null | undefined;
|
314
|
-
}>;
|
94
|
+
}, z.core.$strip>, z.ZodObject<{}, z.core.$strip>]>>>;
|
95
|
+
}, z.core.$strip>;
|
315
96
|
declare const safetyRatingSchema: z.ZodObject<{
|
316
97
|
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
317
98
|
probability: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
@@ -319,21 +100,7 @@ declare const safetyRatingSchema: z.ZodObject<{
|
|
319
100
|
severity: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
320
101
|
severityScore: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
321
102
|
blocked: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
322
|
-
},
|
323
|
-
category?: string | null | undefined;
|
324
|
-
probability?: string | null | undefined;
|
325
|
-
probabilityScore?: number | null | undefined;
|
326
|
-
severity?: string | null | undefined;
|
327
|
-
severityScore?: number | null | undefined;
|
328
|
-
blocked?: boolean | null | undefined;
|
329
|
-
}, {
|
330
|
-
category?: string | null | undefined;
|
331
|
-
probability?: string | null | undefined;
|
332
|
-
probabilityScore?: number | null | undefined;
|
333
|
-
severity?: string | null | undefined;
|
334
|
-
severityScore?: number | null | undefined;
|
335
|
-
blocked?: boolean | null | undefined;
|
336
|
-
}>;
|
103
|
+
}, z.core.$strip>;
|
337
104
|
|
338
105
|
type GoogleGenerativeAIGroundingMetadata = z.infer<typeof groundingMetadataSchema>;
|
339
106
|
type GoogleGenerativeAISafetyRating = z.infer<typeof safetyRatingSchema>;
|