@langchain/google 0.1.0
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 +11 -0
- package/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/chat_models/api-types.d.cts +1506 -0
- package/dist/chat_models/api-types.d.ts +1506 -0
- package/dist/chat_models/base.cjs +445 -0
- package/dist/chat_models/base.cjs.map +1 -0
- package/dist/chat_models/base.d.cts +319 -0
- package/dist/chat_models/base.d.ts +319 -0
- package/dist/chat_models/base.js +442 -0
- package/dist/chat_models/base.js.map +1 -0
- package/dist/chat_models/index.cjs +23 -0
- package/dist/chat_models/index.cjs.map +1 -0
- package/dist/chat_models/index.d.cts +39 -0
- package/dist/chat_models/index.d.ts +39 -0
- package/dist/chat_models/index.js +22 -0
- package/dist/chat_models/index.js.map +1 -0
- package/dist/chat_models/node.cjs +35 -0
- package/dist/chat_models/node.cjs.map +1 -0
- package/dist/chat_models/node.d.cts +13 -0
- package/dist/chat_models/node.d.ts +13 -0
- package/dist/chat_models/node.js +34 -0
- package/dist/chat_models/node.js.map +1 -0
- package/dist/chat_models/profiles.cjs +373 -0
- package/dist/chat_models/profiles.cjs.map +1 -0
- package/dist/chat_models/profiles.js +372 -0
- package/dist/chat_models/profiles.js.map +1 -0
- package/dist/chat_models/types.d.cts +250 -0
- package/dist/chat_models/types.d.ts +250 -0
- package/dist/clients/index.cjs +219 -0
- package/dist/clients/index.cjs.map +1 -0
- package/dist/clients/index.d.cts +49 -0
- package/dist/clients/index.d.ts +49 -0
- package/dist/clients/index.js +217 -0
- package/dist/clients/index.js.map +1 -0
- package/dist/clients/node.cjs +327 -0
- package/dist/clients/node.cjs.map +1 -0
- package/dist/clients/node.d.cts +59 -0
- package/dist/clients/node.d.ts +59 -0
- package/dist/clients/node.js +325 -0
- package/dist/clients/node.js.map +1 -0
- package/dist/const.cjs +13 -0
- package/dist/const.cjs.map +1 -0
- package/dist/const.js +9 -0
- package/dist/const.js.map +1 -0
- package/dist/converters/messages.cjs +697 -0
- package/dist/converters/messages.cjs.map +1 -0
- package/dist/converters/messages.js +691 -0
- package/dist/converters/messages.js.map +1 -0
- package/dist/converters/params.cjs +205 -0
- package/dist/converters/params.cjs.map +1 -0
- package/dist/converters/params.js +202 -0
- package/dist/converters/params.js.map +1 -0
- package/dist/converters/tools.cjs +356 -0
- package/dist/converters/tools.cjs.map +1 -0
- package/dist/converters/tools.js +353 -0
- package/dist/converters/tools.js.map +1 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/node.cjs +7 -0
- package/dist/node.d.cts +3 -0
- package/dist/node.d.ts +3 -0
- package/dist/node.js +4 -0
- package/dist/utils/errors.cjs +543 -0
- package/dist/utils/errors.cjs.map +1 -0
- package/dist/utils/errors.js +535 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/gcp-auth.cjs +188 -0
- package/dist/utils/gcp-auth.cjs.map +1 -0
- package/dist/utils/gcp-auth.d.cts +43 -0
- package/dist/utils/gcp-auth.d.ts +43 -0
- package/dist/utils/gcp-auth.js +186 -0
- package/dist/utils/gcp-auth.js.map +1 -0
- package/dist/utils/handler.cjs +67 -0
- package/dist/utils/handler.cjs.map +1 -0
- package/dist/utils/handler.d.cts +34 -0
- package/dist/utils/handler.d.ts +34 -0
- package/dist/utils/handler.js +64 -0
- package/dist/utils/handler.js.map +1 -0
- package/dist/utils/misc.cjs +10 -0
- package/dist/utils/misc.cjs.map +1 -0
- package/dist/utils/misc.d.cts +14 -0
- package/dist/utils/misc.d.ts +14 -0
- package/dist/utils/misc.js +9 -0
- package/dist/utils/misc.js.map +1 -0
- package/dist/utils/stream.cjs +26 -0
- package/dist/utils/stream.cjs.map +1 -0
- package/dist/utils/stream.js +25 -0
- package/dist/utils/stream.js.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
//#region src/chat_models/profiles.ts
|
|
2
|
+
const PROFILES = {
|
|
3
|
+
"gemini-embedding-001": {
|
|
4
|
+
maxInputTokens: 2048,
|
|
5
|
+
imageInputs: false,
|
|
6
|
+
audioInputs: false,
|
|
7
|
+
pdfInputs: false,
|
|
8
|
+
videoInputs: false,
|
|
9
|
+
maxOutputTokens: 3072,
|
|
10
|
+
reasoningOutput: false,
|
|
11
|
+
imageOutputs: false,
|
|
12
|
+
audioOutputs: false,
|
|
13
|
+
videoOutputs: false,
|
|
14
|
+
toolCalling: false,
|
|
15
|
+
structuredOutput: false
|
|
16
|
+
},
|
|
17
|
+
"gemini-3-flash-preview": {
|
|
18
|
+
maxInputTokens: 1048576,
|
|
19
|
+
imageInputs: true,
|
|
20
|
+
audioInputs: true,
|
|
21
|
+
pdfInputs: true,
|
|
22
|
+
videoInputs: true,
|
|
23
|
+
maxOutputTokens: 65536,
|
|
24
|
+
reasoningOutput: true,
|
|
25
|
+
imageOutputs: false,
|
|
26
|
+
audioOutputs: false,
|
|
27
|
+
videoOutputs: false,
|
|
28
|
+
toolCalling: true,
|
|
29
|
+
structuredOutput: true
|
|
30
|
+
},
|
|
31
|
+
"gemini-2.5-flash-image": {
|
|
32
|
+
maxInputTokens: 32768,
|
|
33
|
+
imageInputs: true,
|
|
34
|
+
audioInputs: false,
|
|
35
|
+
pdfInputs: false,
|
|
36
|
+
videoInputs: false,
|
|
37
|
+
maxOutputTokens: 32768,
|
|
38
|
+
reasoningOutput: true,
|
|
39
|
+
imageOutputs: true,
|
|
40
|
+
audioOutputs: false,
|
|
41
|
+
videoOutputs: false,
|
|
42
|
+
toolCalling: false,
|
|
43
|
+
structuredOutput: false
|
|
44
|
+
},
|
|
45
|
+
"gemini-2.5-flash-preview-05-20": {
|
|
46
|
+
maxInputTokens: 1048576,
|
|
47
|
+
imageInputs: true,
|
|
48
|
+
audioInputs: true,
|
|
49
|
+
pdfInputs: true,
|
|
50
|
+
videoInputs: true,
|
|
51
|
+
maxOutputTokens: 65536,
|
|
52
|
+
reasoningOutput: true,
|
|
53
|
+
imageOutputs: false,
|
|
54
|
+
audioOutputs: false,
|
|
55
|
+
videoOutputs: false,
|
|
56
|
+
toolCalling: true,
|
|
57
|
+
structuredOutput: true
|
|
58
|
+
},
|
|
59
|
+
"gemini-flash-lite-latest": {
|
|
60
|
+
maxInputTokens: 1048576,
|
|
61
|
+
imageInputs: true,
|
|
62
|
+
audioInputs: true,
|
|
63
|
+
pdfInputs: true,
|
|
64
|
+
videoInputs: true,
|
|
65
|
+
maxOutputTokens: 65536,
|
|
66
|
+
reasoningOutput: true,
|
|
67
|
+
imageOutputs: false,
|
|
68
|
+
audioOutputs: false,
|
|
69
|
+
videoOutputs: false,
|
|
70
|
+
toolCalling: true,
|
|
71
|
+
structuredOutput: true
|
|
72
|
+
},
|
|
73
|
+
"gemini-3-pro-preview": {
|
|
74
|
+
maxInputTokens: 1e6,
|
|
75
|
+
imageInputs: true,
|
|
76
|
+
audioInputs: true,
|
|
77
|
+
pdfInputs: true,
|
|
78
|
+
videoInputs: true,
|
|
79
|
+
maxOutputTokens: 64e3,
|
|
80
|
+
reasoningOutput: true,
|
|
81
|
+
imageOutputs: false,
|
|
82
|
+
audioOutputs: false,
|
|
83
|
+
videoOutputs: false,
|
|
84
|
+
toolCalling: true,
|
|
85
|
+
structuredOutput: true
|
|
86
|
+
},
|
|
87
|
+
"gemini-2.5-flash": {
|
|
88
|
+
maxInputTokens: 1048576,
|
|
89
|
+
imageInputs: true,
|
|
90
|
+
audioInputs: true,
|
|
91
|
+
pdfInputs: true,
|
|
92
|
+
videoInputs: true,
|
|
93
|
+
maxOutputTokens: 65536,
|
|
94
|
+
reasoningOutput: true,
|
|
95
|
+
imageOutputs: false,
|
|
96
|
+
audioOutputs: false,
|
|
97
|
+
videoOutputs: false,
|
|
98
|
+
toolCalling: true,
|
|
99
|
+
structuredOutput: true
|
|
100
|
+
},
|
|
101
|
+
"gemini-flash-latest": {
|
|
102
|
+
maxInputTokens: 1048576,
|
|
103
|
+
imageInputs: true,
|
|
104
|
+
audioInputs: true,
|
|
105
|
+
pdfInputs: true,
|
|
106
|
+
videoInputs: true,
|
|
107
|
+
maxOutputTokens: 65536,
|
|
108
|
+
reasoningOutput: true,
|
|
109
|
+
imageOutputs: false,
|
|
110
|
+
audioOutputs: false,
|
|
111
|
+
videoOutputs: false,
|
|
112
|
+
toolCalling: true,
|
|
113
|
+
structuredOutput: true
|
|
114
|
+
},
|
|
115
|
+
"gemini-2.5-pro-preview-05-06": {
|
|
116
|
+
maxInputTokens: 1048576,
|
|
117
|
+
imageInputs: true,
|
|
118
|
+
audioInputs: true,
|
|
119
|
+
pdfInputs: true,
|
|
120
|
+
videoInputs: true,
|
|
121
|
+
maxOutputTokens: 65536,
|
|
122
|
+
reasoningOutput: true,
|
|
123
|
+
imageOutputs: false,
|
|
124
|
+
audioOutputs: false,
|
|
125
|
+
videoOutputs: false,
|
|
126
|
+
toolCalling: true,
|
|
127
|
+
structuredOutput: true
|
|
128
|
+
},
|
|
129
|
+
"gemini-2.5-flash-preview-tts": {
|
|
130
|
+
maxInputTokens: 8e3,
|
|
131
|
+
imageInputs: false,
|
|
132
|
+
audioInputs: false,
|
|
133
|
+
pdfInputs: false,
|
|
134
|
+
videoInputs: false,
|
|
135
|
+
maxOutputTokens: 16e3,
|
|
136
|
+
reasoningOutput: false,
|
|
137
|
+
imageOutputs: false,
|
|
138
|
+
audioOutputs: true,
|
|
139
|
+
videoOutputs: false,
|
|
140
|
+
toolCalling: false,
|
|
141
|
+
structuredOutput: false
|
|
142
|
+
},
|
|
143
|
+
"gemini-2.0-flash-lite": {
|
|
144
|
+
maxInputTokens: 1048576,
|
|
145
|
+
imageInputs: true,
|
|
146
|
+
audioInputs: true,
|
|
147
|
+
pdfInputs: true,
|
|
148
|
+
videoInputs: true,
|
|
149
|
+
maxOutputTokens: 8192,
|
|
150
|
+
reasoningOutput: false,
|
|
151
|
+
imageOutputs: false,
|
|
152
|
+
audioOutputs: false,
|
|
153
|
+
videoOutputs: false,
|
|
154
|
+
toolCalling: true,
|
|
155
|
+
structuredOutput: true
|
|
156
|
+
},
|
|
157
|
+
"gemini-live-2.5-flash-preview-native-audio": {
|
|
158
|
+
maxInputTokens: 131072,
|
|
159
|
+
imageInputs: false,
|
|
160
|
+
audioInputs: true,
|
|
161
|
+
pdfInputs: false,
|
|
162
|
+
videoInputs: true,
|
|
163
|
+
maxOutputTokens: 65536,
|
|
164
|
+
reasoningOutput: true,
|
|
165
|
+
imageOutputs: false,
|
|
166
|
+
audioOutputs: true,
|
|
167
|
+
videoOutputs: false,
|
|
168
|
+
toolCalling: true,
|
|
169
|
+
structuredOutput: false
|
|
170
|
+
},
|
|
171
|
+
"gemini-2.0-flash": {
|
|
172
|
+
maxInputTokens: 1048576,
|
|
173
|
+
imageInputs: true,
|
|
174
|
+
audioInputs: true,
|
|
175
|
+
pdfInputs: true,
|
|
176
|
+
videoInputs: true,
|
|
177
|
+
maxOutputTokens: 8192,
|
|
178
|
+
reasoningOutput: false,
|
|
179
|
+
imageOutputs: false,
|
|
180
|
+
audioOutputs: false,
|
|
181
|
+
videoOutputs: false,
|
|
182
|
+
toolCalling: true,
|
|
183
|
+
structuredOutput: true
|
|
184
|
+
},
|
|
185
|
+
"gemini-2.5-flash-lite": {
|
|
186
|
+
maxInputTokens: 1048576,
|
|
187
|
+
imageInputs: true,
|
|
188
|
+
audioInputs: true,
|
|
189
|
+
pdfInputs: true,
|
|
190
|
+
videoInputs: true,
|
|
191
|
+
maxOutputTokens: 65536,
|
|
192
|
+
reasoningOutput: true,
|
|
193
|
+
imageOutputs: false,
|
|
194
|
+
audioOutputs: false,
|
|
195
|
+
videoOutputs: false,
|
|
196
|
+
toolCalling: true,
|
|
197
|
+
structuredOutput: true
|
|
198
|
+
},
|
|
199
|
+
"gemini-2.5-pro-preview-06-05": {
|
|
200
|
+
maxInputTokens: 1048576,
|
|
201
|
+
imageInputs: true,
|
|
202
|
+
audioInputs: true,
|
|
203
|
+
pdfInputs: true,
|
|
204
|
+
videoInputs: true,
|
|
205
|
+
maxOutputTokens: 65536,
|
|
206
|
+
reasoningOutput: true,
|
|
207
|
+
imageOutputs: false,
|
|
208
|
+
audioOutputs: false,
|
|
209
|
+
videoOutputs: false,
|
|
210
|
+
toolCalling: true,
|
|
211
|
+
structuredOutput: true
|
|
212
|
+
},
|
|
213
|
+
"gemini-live-2.5-flash": {
|
|
214
|
+
maxInputTokens: 128e3,
|
|
215
|
+
imageInputs: true,
|
|
216
|
+
audioInputs: true,
|
|
217
|
+
pdfInputs: false,
|
|
218
|
+
videoInputs: true,
|
|
219
|
+
maxOutputTokens: 8e3,
|
|
220
|
+
reasoningOutput: true,
|
|
221
|
+
imageOutputs: false,
|
|
222
|
+
audioOutputs: true,
|
|
223
|
+
videoOutputs: false,
|
|
224
|
+
toolCalling: true,
|
|
225
|
+
structuredOutput: false
|
|
226
|
+
},
|
|
227
|
+
"gemini-2.5-flash-lite-preview-06-17": {
|
|
228
|
+
maxInputTokens: 1048576,
|
|
229
|
+
imageInputs: true,
|
|
230
|
+
audioInputs: true,
|
|
231
|
+
pdfInputs: true,
|
|
232
|
+
videoInputs: true,
|
|
233
|
+
maxOutputTokens: 65536,
|
|
234
|
+
reasoningOutput: true,
|
|
235
|
+
imageOutputs: false,
|
|
236
|
+
audioOutputs: false,
|
|
237
|
+
videoOutputs: false,
|
|
238
|
+
toolCalling: true,
|
|
239
|
+
structuredOutput: false
|
|
240
|
+
},
|
|
241
|
+
"gemini-2.5-flash-image-preview": {
|
|
242
|
+
maxInputTokens: 32768,
|
|
243
|
+
imageInputs: true,
|
|
244
|
+
audioInputs: false,
|
|
245
|
+
pdfInputs: false,
|
|
246
|
+
videoInputs: false,
|
|
247
|
+
maxOutputTokens: 32768,
|
|
248
|
+
reasoningOutput: true,
|
|
249
|
+
imageOutputs: true,
|
|
250
|
+
audioOutputs: false,
|
|
251
|
+
videoOutputs: false,
|
|
252
|
+
toolCalling: false,
|
|
253
|
+
structuredOutput: false
|
|
254
|
+
},
|
|
255
|
+
"gemini-2.5-flash-preview-09-2025": {
|
|
256
|
+
maxInputTokens: 1048576,
|
|
257
|
+
imageInputs: true,
|
|
258
|
+
audioInputs: true,
|
|
259
|
+
pdfInputs: true,
|
|
260
|
+
videoInputs: true,
|
|
261
|
+
maxOutputTokens: 65536,
|
|
262
|
+
reasoningOutput: true,
|
|
263
|
+
imageOutputs: false,
|
|
264
|
+
audioOutputs: false,
|
|
265
|
+
videoOutputs: false,
|
|
266
|
+
toolCalling: true,
|
|
267
|
+
structuredOutput: true
|
|
268
|
+
},
|
|
269
|
+
"gemini-2.5-flash-preview-04-17": {
|
|
270
|
+
maxInputTokens: 1048576,
|
|
271
|
+
imageInputs: true,
|
|
272
|
+
audioInputs: true,
|
|
273
|
+
pdfInputs: true,
|
|
274
|
+
videoInputs: true,
|
|
275
|
+
maxOutputTokens: 65536,
|
|
276
|
+
reasoningOutput: true,
|
|
277
|
+
imageOutputs: false,
|
|
278
|
+
audioOutputs: false,
|
|
279
|
+
videoOutputs: false,
|
|
280
|
+
toolCalling: true,
|
|
281
|
+
structuredOutput: false
|
|
282
|
+
},
|
|
283
|
+
"gemini-2.5-pro-preview-tts": {
|
|
284
|
+
maxInputTokens: 8e3,
|
|
285
|
+
imageInputs: false,
|
|
286
|
+
audioInputs: false,
|
|
287
|
+
pdfInputs: false,
|
|
288
|
+
videoInputs: false,
|
|
289
|
+
maxOutputTokens: 16e3,
|
|
290
|
+
reasoningOutput: false,
|
|
291
|
+
imageOutputs: false,
|
|
292
|
+
audioOutputs: true,
|
|
293
|
+
videoOutputs: false,
|
|
294
|
+
toolCalling: false,
|
|
295
|
+
structuredOutput: false
|
|
296
|
+
},
|
|
297
|
+
"gemini-2.5-pro": {
|
|
298
|
+
maxInputTokens: 1048576,
|
|
299
|
+
imageInputs: true,
|
|
300
|
+
audioInputs: true,
|
|
301
|
+
pdfInputs: true,
|
|
302
|
+
videoInputs: true,
|
|
303
|
+
maxOutputTokens: 65536,
|
|
304
|
+
reasoningOutput: true,
|
|
305
|
+
imageOutputs: false,
|
|
306
|
+
audioOutputs: false,
|
|
307
|
+
videoOutputs: false,
|
|
308
|
+
toolCalling: true,
|
|
309
|
+
structuredOutput: true
|
|
310
|
+
},
|
|
311
|
+
"gemini-1.5-flash": {
|
|
312
|
+
maxInputTokens: 1e6,
|
|
313
|
+
imageInputs: true,
|
|
314
|
+
audioInputs: true,
|
|
315
|
+
pdfInputs: false,
|
|
316
|
+
videoInputs: true,
|
|
317
|
+
maxOutputTokens: 8192,
|
|
318
|
+
reasoningOutput: false,
|
|
319
|
+
imageOutputs: false,
|
|
320
|
+
audioOutputs: false,
|
|
321
|
+
videoOutputs: false,
|
|
322
|
+
toolCalling: true,
|
|
323
|
+
structuredOutput: false
|
|
324
|
+
},
|
|
325
|
+
"gemini-1.5-flash-8b": {
|
|
326
|
+
maxInputTokens: 1e6,
|
|
327
|
+
imageInputs: true,
|
|
328
|
+
audioInputs: true,
|
|
329
|
+
pdfInputs: false,
|
|
330
|
+
videoInputs: true,
|
|
331
|
+
maxOutputTokens: 8192,
|
|
332
|
+
reasoningOutput: false,
|
|
333
|
+
imageOutputs: false,
|
|
334
|
+
audioOutputs: false,
|
|
335
|
+
videoOutputs: false,
|
|
336
|
+
toolCalling: true,
|
|
337
|
+
structuredOutput: false
|
|
338
|
+
},
|
|
339
|
+
"gemini-2.5-flash-lite-preview-09-2025": {
|
|
340
|
+
maxInputTokens: 1048576,
|
|
341
|
+
imageInputs: true,
|
|
342
|
+
audioInputs: true,
|
|
343
|
+
pdfInputs: true,
|
|
344
|
+
videoInputs: true,
|
|
345
|
+
maxOutputTokens: 65536,
|
|
346
|
+
reasoningOutput: true,
|
|
347
|
+
imageOutputs: false,
|
|
348
|
+
audioOutputs: false,
|
|
349
|
+
videoOutputs: false,
|
|
350
|
+
toolCalling: true,
|
|
351
|
+
structuredOutput: true
|
|
352
|
+
},
|
|
353
|
+
"gemini-1.5-pro": {
|
|
354
|
+
maxInputTokens: 1e6,
|
|
355
|
+
imageInputs: true,
|
|
356
|
+
audioInputs: true,
|
|
357
|
+
pdfInputs: false,
|
|
358
|
+
videoInputs: true,
|
|
359
|
+
maxOutputTokens: 8192,
|
|
360
|
+
reasoningOutput: false,
|
|
361
|
+
imageOutputs: false,
|
|
362
|
+
audioOutputs: false,
|
|
363
|
+
videoOutputs: false,
|
|
364
|
+
toolCalling: true,
|
|
365
|
+
structuredOutput: false
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
var profiles_default = PROFILES;
|
|
369
|
+
|
|
370
|
+
//#endregion
|
|
371
|
+
export { profiles_default as default };
|
|
372
|
+
//# sourceMappingURL=profiles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.js","names":["PROFILES: Record<string, ModelProfile>"],"sources":["../../src/chat_models/profiles.ts"],"sourcesContent":["/**\n * This file was automatically generated by an automated script. Do not edit manually.\n */\nimport type { ModelProfile } from \"@langchain/core/language_models/profile\";\nconst PROFILES: Record<string, ModelProfile> = {\n \"gemini-embedding-001\": {\n maxInputTokens: 2048,\n imageInputs: false,\n audioInputs: false,\n pdfInputs: false,\n videoInputs: false,\n maxOutputTokens: 3072,\n reasoningOutput: false,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: false,\n structuredOutput: false,\n },\n \"gemini-3-flash-preview\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-2.5-flash-image\": {\n maxInputTokens: 32768,\n imageInputs: true,\n audioInputs: false,\n pdfInputs: false,\n videoInputs: false,\n maxOutputTokens: 32768,\n reasoningOutput: true,\n imageOutputs: true,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: false,\n structuredOutput: false,\n },\n \"gemini-2.5-flash-preview-05-20\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-flash-lite-latest\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-3-pro-preview\": {\n maxInputTokens: 1000000,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 64000,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-2.5-flash\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-flash-latest\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-2.5-pro-preview-05-06\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-2.5-flash-preview-tts\": {\n maxInputTokens: 8000,\n imageInputs: false,\n audioInputs: false,\n pdfInputs: false,\n videoInputs: false,\n maxOutputTokens: 16000,\n reasoningOutput: false,\n imageOutputs: false,\n audioOutputs: true,\n videoOutputs: false,\n toolCalling: false,\n structuredOutput: false,\n },\n \"gemini-2.0-flash-lite\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 8192,\n reasoningOutput: false,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-live-2.5-flash-preview-native-audio\": {\n maxInputTokens: 131072,\n imageInputs: false,\n audioInputs: true,\n pdfInputs: false,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: true,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: false,\n },\n \"gemini-2.0-flash\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 8192,\n reasoningOutput: false,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-2.5-flash-lite\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-2.5-pro-preview-06-05\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-live-2.5-flash\": {\n maxInputTokens: 128000,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: false,\n videoInputs: true,\n maxOutputTokens: 8000,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: true,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: false,\n },\n \"gemini-2.5-flash-lite-preview-06-17\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: false,\n },\n \"gemini-2.5-flash-image-preview\": {\n maxInputTokens: 32768,\n imageInputs: true,\n audioInputs: false,\n pdfInputs: false,\n videoInputs: false,\n maxOutputTokens: 32768,\n reasoningOutput: true,\n imageOutputs: true,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: false,\n structuredOutput: false,\n },\n \"gemini-2.5-flash-preview-09-2025\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-2.5-flash-preview-04-17\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: false,\n },\n \"gemini-2.5-pro-preview-tts\": {\n maxInputTokens: 8000,\n imageInputs: false,\n audioInputs: false,\n pdfInputs: false,\n videoInputs: false,\n maxOutputTokens: 16000,\n reasoningOutput: false,\n imageOutputs: false,\n audioOutputs: true,\n videoOutputs: false,\n toolCalling: false,\n structuredOutput: false,\n },\n \"gemini-2.5-pro\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-1.5-flash\": {\n maxInputTokens: 1000000,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: false,\n videoInputs: true,\n maxOutputTokens: 8192,\n reasoningOutput: false,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: false,\n },\n \"gemini-1.5-flash-8b\": {\n maxInputTokens: 1000000,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: false,\n videoInputs: true,\n maxOutputTokens: 8192,\n reasoningOutput: false,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: false,\n },\n \"gemini-2.5-flash-lite-preview-09-2025\": {\n maxInputTokens: 1048576,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: true,\n videoInputs: true,\n maxOutputTokens: 65536,\n reasoningOutput: true,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: true,\n },\n \"gemini-1.5-pro\": {\n maxInputTokens: 1000000,\n imageInputs: true,\n audioInputs: true,\n pdfInputs: false,\n videoInputs: true,\n maxOutputTokens: 8192,\n reasoningOutput: false,\n imageOutputs: false,\n audioOutputs: false,\n videoOutputs: false,\n toolCalling: true,\n structuredOutput: false,\n },\n};\nexport default PROFILES;\n"],"mappings":"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;EACb,kBAAkB;CACnB;CACD,uCAAuC;EACrC,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,kCAAkC;EAChC,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,oCAAoC;EAClC,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,kCAAkC;EAChC,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,8BAA8B;EAC5B,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,kBAAkB;EAChB,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,oBAAoB;EAClB,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,uBAAuB;EACrB,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,yCAAyC;EACvC,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;CACD,kBAAkB;EAChB,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,iBAAiB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa;EACb,kBAAkB;CACnB;AACF;AACD,uBAAe"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { Prettify } from "../utils/misc.cjs";
|
|
2
|
+
import { Gemini } from "./api-types.cjs";
|
|
3
|
+
import { BindToolsInput } from "@langchain/core/language_models/chat_models";
|
|
4
|
+
import { InteropZodType } from "@langchain/core/utils/types";
|
|
5
|
+
|
|
6
|
+
//#region src/chat_models/types.d.ts
|
|
7
|
+
interface ChatGoogleFields {
|
|
8
|
+
/**
|
|
9
|
+
* The temperature is used for sampling during response generation, which
|
|
10
|
+
* occurs when topP and topK are applied. Temperature controls the degree of
|
|
11
|
+
* randomness in token selection. Lower temperatures are good for prompts that
|
|
12
|
+
* require a less open-ended or creative response, while higher temperatures
|
|
13
|
+
* can lead to more diverse or creative results.
|
|
14
|
+
*
|
|
15
|
+
* Specify a lower value for less random responses and a higher value for more
|
|
16
|
+
* random responses.
|
|
17
|
+
*/
|
|
18
|
+
temperature?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Top-P changes how the model selects tokens for output. Tokens are selected
|
|
21
|
+
* from the most probable to least probable until the sum of their
|
|
22
|
+
* probabilities equals the top-P value.
|
|
23
|
+
*
|
|
24
|
+
* Specify a lower value for less random responses and a higher value for more
|
|
25
|
+
* random responses.
|
|
26
|
+
*/
|
|
27
|
+
topP?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Top-K changes how the model selects tokens for output. A top-K of 1 means
|
|
30
|
+
* the selected token is the most probable among all tokens in the model's
|
|
31
|
+
* vocabulary (also called greedy decoding), while a top-K of 3 means that the
|
|
32
|
+
* next token is selected from among the 3 most probable tokens (using
|
|
33
|
+
* temperature).
|
|
34
|
+
*/
|
|
35
|
+
topK?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Maximum number of tokens that can be generated in the response. A token is
|
|
38
|
+
* approximately four characters. 100 tokens correspond to roughly 60-80 words.
|
|
39
|
+
* Specify a lower value for shorter responses and a higher value for
|
|
40
|
+
* potentially longer responses.
|
|
41
|
+
*/
|
|
42
|
+
maxOutputTokens?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Positive values penalize tokens that already appear in the generated text,
|
|
45
|
+
* increasing the probability of generating more diverse content.
|
|
46
|
+
*/
|
|
47
|
+
presencePenalty?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Positive values penalize tokens that repeatedly appear in the generated
|
|
50
|
+
* text, decreasing the probability of repeating content.
|
|
51
|
+
*/
|
|
52
|
+
frequencyPenalty?: number;
|
|
53
|
+
/**
|
|
54
|
+
* Specifies a list of strings that tells the model to stop generating text if
|
|
55
|
+
* one of the strings is encountered in the response. If a string appears
|
|
56
|
+
* multiple times in the response, then the response truncates where it's
|
|
57
|
+
* first encountered. The strings are case-sensitive.
|
|
58
|
+
*/
|
|
59
|
+
stopSequences?: string[];
|
|
60
|
+
/**
|
|
61
|
+
* When seed is fixed to a specific value, the model makes a best effort to
|
|
62
|
+
* provide the same response for repeated requests. Deterministic output isn't
|
|
63
|
+
* guaranteed. Also, changing the model or parameter settings, such as the
|
|
64
|
+
* temperature, can cause variations in the response even when you use the
|
|
65
|
+
* same seed value. By default, a random seed value is used.
|
|
66
|
+
*/
|
|
67
|
+
seed?: number;
|
|
68
|
+
/**
|
|
69
|
+
* If true, returns the log probabilities of the tokens that were chosen by
|
|
70
|
+
* the model at each step. By default, this parameter is set to false.
|
|
71
|
+
*/
|
|
72
|
+
responseLogprobs?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Returns the log probabilities of the top candidate tokens at each generation
|
|
75
|
+
* step. The model's chosen token might not be the same as the top candidate
|
|
76
|
+
* token at each step. Specify the number of candidates to return by using an
|
|
77
|
+
* integer value in the range of 1-20.
|
|
78
|
+
*/
|
|
79
|
+
logprobs?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Per request settings for blocking unsafe content
|
|
82
|
+
*/
|
|
83
|
+
safetySettings?: Prettify<Gemini.SafetySetting>[];
|
|
84
|
+
/**
|
|
85
|
+
* Configuration for the model's thinking process
|
|
86
|
+
*/
|
|
87
|
+
thinkingConfig?: Prettify<Gemini.ThinkingConfig>;
|
|
88
|
+
/**
|
|
89
|
+
* The schema that the generated response should match.
|
|
90
|
+
* Can be a Zod schema or a JSON Schema object.
|
|
91
|
+
* When set, the response will be structured according to this schema
|
|
92
|
+
* and `responseMimeType` will automatically be set to "application/json".
|
|
93
|
+
*/
|
|
94
|
+
responseSchema?: InteropZodType | Record<string, unknown>;
|
|
95
|
+
/**
|
|
96
|
+
* A list of tools the model may use to generate the next response.
|
|
97
|
+
* Can be LangChain tools, OpenAI tools, or Gemini function declarations.
|
|
98
|
+
*/
|
|
99
|
+
tools?: BindToolsInput[];
|
|
100
|
+
/**
|
|
101
|
+
* The requested modalities of the response.
|
|
102
|
+
* Represents the set of modalities that the model can return.
|
|
103
|
+
* An empty list is equivalent to requesting only text.
|
|
104
|
+
*/
|
|
105
|
+
responseModalities?: Prettify<Gemini.GenerativeLanguageModality>[];
|
|
106
|
+
/**
|
|
107
|
+
* If true, enables enhanced civic answers feature.
|
|
108
|
+
*/
|
|
109
|
+
enableEnhancedCivicAnswers?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Speech generation configuration.
|
|
112
|
+
* You can use either Google's definition of the speech configuration,
|
|
113
|
+
* or a simplified version we've defined (which can be as simple
|
|
114
|
+
* as the name of a pre-defined voice).
|
|
115
|
+
*/
|
|
116
|
+
speechConfig?: Prettify<Gemini.SpeechConfig> | SimplifiedSpeechConfig;
|
|
117
|
+
/**
|
|
118
|
+
* Configuration for image generation.
|
|
119
|
+
*/
|
|
120
|
+
imageConfig?: Prettify<Gemini.ImageConfig>;
|
|
121
|
+
/**
|
|
122
|
+
* Media resolution for input media processing.
|
|
123
|
+
*/
|
|
124
|
+
mediaResolution?: Prettify<Gemini.MediaResolution>;
|
|
125
|
+
/**
|
|
126
|
+
* The number of reasoning tokens that the model should generate.
|
|
127
|
+
* If explicitly set, then the reasoning blocks will be returned.
|
|
128
|
+
*/
|
|
129
|
+
maxReasoningTokens?: number;
|
|
130
|
+
/**
|
|
131
|
+
* An alias for `maxReasoningTokens` for compatibility.
|
|
132
|
+
*/
|
|
133
|
+
thinkingBudget?: number;
|
|
134
|
+
/**
|
|
135
|
+
* An alias for `maxReasoningTokens` under Gemini 2.5 or
|
|
136
|
+
* the primary thinking/reasoning setting for Gemini 3.
|
|
137
|
+
* If explicitly set, then the reasoning blocks will be returned.
|
|
138
|
+
*/
|
|
139
|
+
reasoningEffort?: Gemini.ThinkingLevel;
|
|
140
|
+
/**
|
|
141
|
+
* An alias for `reasoningEffort` for compatibility.
|
|
142
|
+
*/
|
|
143
|
+
thinkingLevel?: Gemini.ThinkingLevel;
|
|
144
|
+
}
|
|
145
|
+
declare module "./api-types.js" {
|
|
146
|
+
namespace Gemini {
|
|
147
|
+
namespace Part {
|
|
148
|
+
type CodeExecutionResult = Pick<Gemini.Part, "codeExecutionResult">;
|
|
149
|
+
type ExecutableCode = Pick<Gemini.Part, "executableCode">;
|
|
150
|
+
type FileData = Pick<Gemini.Part, "fileData" | "videoMetadata">;
|
|
151
|
+
type FunctionCall = Required<Pick<Gemini.Part, "functionCall">> & Pick<Gemini.Part, "thoughtSignature">;
|
|
152
|
+
type FunctionResponse = Pick<Gemini.Part, "functionResponse">;
|
|
153
|
+
type InlineData = Pick<Gemini.Part, "inlineData" | "videoMetadata">;
|
|
154
|
+
type MediaResolution = Pick<Gemini.Part, "mediaResolution">;
|
|
155
|
+
type PartMetadata = Pick<Gemini.Part, "partMetadata">;
|
|
156
|
+
type Text = Pick<Gemini.Part, "text">;
|
|
157
|
+
type Thought = Pick<Gemini.Part, "thought">;
|
|
158
|
+
type ThoughtSignature = Pick<Gemini.Part, "thoughtSignature">;
|
|
159
|
+
}
|
|
160
|
+
namespace PrebuiltVoiceConfig {
|
|
161
|
+
/**
|
|
162
|
+
* The name of a prebuilt voice that can be used for speech synthesis.
|
|
163
|
+
*
|
|
164
|
+
* Extracted as a non-nullable type from the GeminiBase.PrebuiltVoiceConfig["voiceName"] property.
|
|
165
|
+
*/
|
|
166
|
+
type VoiceName = NonNullable<Gemini.PrebuiltVoiceConfig["voiceName"]>;
|
|
167
|
+
}
|
|
168
|
+
namespace SpeakerVoiceConfig {
|
|
169
|
+
/**
|
|
170
|
+
* The speaker identifier for a custom or multi-speaker TTS configuration.
|
|
171
|
+
*
|
|
172
|
+
* Extracted as a non-nullable type from the GeminiBase.SpeakerVoiceConfig["speaker"] property.
|
|
173
|
+
*/
|
|
174
|
+
type Speaker = NonNullable<Gemini.SpeakerVoiceConfig["speaker"]>;
|
|
175
|
+
}
|
|
176
|
+
namespace SpeechConfig {
|
|
177
|
+
/**
|
|
178
|
+
* The BCP-47 language code for speech synthesis (e.g., "en-US").
|
|
179
|
+
*
|
|
180
|
+
* Extracted as a non-nullable type from the GeminiBase.SpeechConfig["languageCode"] property.
|
|
181
|
+
*/
|
|
182
|
+
type LanguageCode = NonNullable<Gemini.SpeechConfig["languageCode"]>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The level of "thinking" or reasoning configured for the model.
|
|
186
|
+
*
|
|
187
|
+
* Corresponds to GeminiBase.ThinkingConfig["thinkingLevel"].
|
|
188
|
+
*/
|
|
189
|
+
type ThinkingLevel = Gemini.ThinkingConfig["thinkingLevel"];
|
|
190
|
+
/**
|
|
191
|
+
* The role of a content message. The spec types this as `string`, but
|
|
192
|
+
* the API only accepts these specific values.
|
|
193
|
+
*/
|
|
194
|
+
type Role = "user" | "model" | "function";
|
|
195
|
+
/**
|
|
196
|
+
* Alias for the unwieldy generated grounding support type name.
|
|
197
|
+
*/
|
|
198
|
+
type GroundingSupport = Gemini.GoogleAiGenerativelanguageV1betaGroundingSupport;
|
|
199
|
+
/**
|
|
200
|
+
* Alias for the unwieldy generated segment type name.
|
|
201
|
+
*/
|
|
202
|
+
type Segment = Gemini.GoogleAiGenerativelanguageV1betaSegment;
|
|
203
|
+
namespace Tools {
|
|
204
|
+
/**
|
|
205
|
+
* The mode for function calling configuration, extracted from the
|
|
206
|
+
* FunctionCallingConfig interface.
|
|
207
|
+
*/
|
|
208
|
+
type FunctionCallingConfigMode = Gemini.Tools.FunctionCallingConfig["mode"];
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Legacy URL retrieval metadata (predecessor of UrlContextMetadata).
|
|
212
|
+
* Not in the current OpenAPI spec but still returned by the API.
|
|
213
|
+
*/
|
|
214
|
+
interface UrlRetrievalMetadata {
|
|
215
|
+
urlRetrievalContexts?: Array<Gemini.UrlMetadata>;
|
|
216
|
+
}
|
|
217
|
+
interface Candidate {
|
|
218
|
+
/** @deprecated Use urlContextMetadata instead. */
|
|
219
|
+
readonly urlRetrievalMetadata?: UrlRetrievalMetadata;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Simplified speaker/name pair for multi-speaker config.
|
|
225
|
+
* - `speaker` derived from SpeakerVoiceConfig["speaker"]
|
|
226
|
+
* - `name` is the prebuilt voice name
|
|
227
|
+
*/
|
|
228
|
+
interface SpeechSpeakerName {
|
|
229
|
+
speaker: Gemini.SpeakerVoiceConfig.Speaker;
|
|
230
|
+
name: Gemini.PrebuiltVoiceConfig.VoiceName;
|
|
231
|
+
}
|
|
232
|
+
/** A voice can be a prebuilt voice name, a speaker/name pair, or an array of pairs */
|
|
233
|
+
type SpeechVoice = Gemini.PrebuiltVoiceConfig.VoiceName | SpeechSpeakerName | SpeechSpeakerName[];
|
|
234
|
+
/** Voice with language code (derived from SpeechConfig's languageCode) */
|
|
235
|
+
interface SpeechVoiceLanguage {
|
|
236
|
+
voice: SpeechVoice;
|
|
237
|
+
languageCode: Gemini.SpeechConfig.LanguageCode;
|
|
238
|
+
}
|
|
239
|
+
/** Voices with language code */
|
|
240
|
+
interface SpeechVoicesLanguage {
|
|
241
|
+
voices: SpeechVoice;
|
|
242
|
+
languageCode: Gemini.SpeechConfig.LanguageCode;
|
|
243
|
+
}
|
|
244
|
+
/** Simplified language config (with voice or voices) */
|
|
245
|
+
type SimplifiedSpeechLanguageConfig = SpeechVoiceLanguage | SpeechVoicesLanguage;
|
|
246
|
+
/** Top-level simplified config: just a voice, or voice+language */
|
|
247
|
+
type SimplifiedSpeechConfig = SpeechVoice | SimplifiedSpeechLanguageConfig;
|
|
248
|
+
//#endregion
|
|
249
|
+
export { ChatGoogleFields };
|
|
250
|
+
//# sourceMappingURL=types.d.cts.map
|