@adaline/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.
@@ -0,0 +1,3022 @@
1
+ import * as zod from 'zod';
2
+ import { z } from 'zod';
3
+ import { ChatModelSchemaType, ChatModelV1, UrlType, HeadersType, ParamsType, EmbeddingModelSchemaType, EmbeddingModelV1, ProviderV1 } from '@adaline/provider';
4
+ import { MessageType, ConfigType, ToolType, ChatResponseType, PartialChatResponseType, EmbeddingRequestsType, EmbeddingResponseType } from '@adaline/types';
5
+
6
+ declare const GoogleChatModelConfigs: {
7
+ readonly base: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
8
+ def: {
9
+ readonly temperature: {
10
+ type: "range";
11
+ param: string;
12
+ title: string;
13
+ description: string;
14
+ max: number;
15
+ min: number;
16
+ step: number;
17
+ default: number;
18
+ };
19
+ readonly maxTokens: {
20
+ type: "range";
21
+ param: string;
22
+ title: string;
23
+ description: string;
24
+ max: number;
25
+ min: number;
26
+ step: number;
27
+ default: number;
28
+ };
29
+ readonly stop: {
30
+ type: "multi-string";
31
+ param: string;
32
+ title: string;
33
+ description: string;
34
+ max: number;
35
+ };
36
+ readonly topP: {
37
+ type: "range";
38
+ param: string;
39
+ title: string;
40
+ description: string;
41
+ max: number;
42
+ min: number;
43
+ step: number;
44
+ default: number;
45
+ };
46
+ readonly toolChoice: {
47
+ type: "select-string";
48
+ param: string;
49
+ title: string;
50
+ description: string;
51
+ default: string | null;
52
+ choices: string[];
53
+ };
54
+ readonly safetySettings: {
55
+ type: "object-schema";
56
+ param: string;
57
+ title: string;
58
+ description: string;
59
+ objectSchema?: any;
60
+ };
61
+ };
62
+ schema: zod.ZodObject<{
63
+ temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
64
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
65
+ stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
66
+ topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
67
+ toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
68
+ safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
69
+ [x: string]: any;
70
+ }, {
71
+ [x: string]: any;
72
+ }>>;
73
+ }, "strip", zod.ZodTypeAny, {
74
+ toolChoice?: string | null | undefined;
75
+ safetySettings?: {
76
+ [x: string]: any;
77
+ } | undefined;
78
+ temperature?: number | undefined;
79
+ topP?: number | undefined;
80
+ maxTokens?: number | undefined;
81
+ stop?: string[] | undefined;
82
+ }, {
83
+ toolChoice?: string | null | undefined;
84
+ safetySettings?: {
85
+ [x: string]: any;
86
+ } | undefined;
87
+ temperature?: number | undefined;
88
+ topP?: number | undefined;
89
+ maxTokens?: number | undefined;
90
+ stop?: string[] | undefined;
91
+ }>;
92
+ };
93
+ readonly c1: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => {
94
+ def: {
95
+ readonly temperature: {
96
+ type: "range";
97
+ param: string;
98
+ title: string;
99
+ description: string;
100
+ max: number;
101
+ min: number;
102
+ step: number;
103
+ default: number;
104
+ };
105
+ readonly maxTokens: {
106
+ type: "range";
107
+ param: string;
108
+ title: string;
109
+ description: string;
110
+ max: number;
111
+ min: number;
112
+ step: number;
113
+ default: number;
114
+ };
115
+ readonly stop: {
116
+ type: "multi-string";
117
+ param: string;
118
+ title: string;
119
+ description: string;
120
+ max: number;
121
+ };
122
+ readonly topP: {
123
+ type: "range";
124
+ param: string;
125
+ title: string;
126
+ description: string;
127
+ max: number;
128
+ min: number;
129
+ step: number;
130
+ default: number;
131
+ };
132
+ readonly topK: {
133
+ type: "range";
134
+ param: string;
135
+ title: string;
136
+ description: string;
137
+ max: number;
138
+ min: number;
139
+ step: number;
140
+ default: number;
141
+ };
142
+ readonly frequencyPenalty: {
143
+ type: "range";
144
+ param: string;
145
+ title: string;
146
+ description: string;
147
+ max: number;
148
+ min: number;
149
+ step: number;
150
+ default: number;
151
+ };
152
+ readonly presencePenalty: {
153
+ type: "range";
154
+ param: string;
155
+ title: string;
156
+ description: string;
157
+ max: number;
158
+ min: number;
159
+ step: number;
160
+ default: number;
161
+ };
162
+ readonly seed: {
163
+ type: "range";
164
+ param: string;
165
+ title: string;
166
+ description: string;
167
+ max: number;
168
+ min: number;
169
+ step: number;
170
+ default: number;
171
+ };
172
+ readonly toolChoice: {
173
+ type: "select-string";
174
+ param: string;
175
+ title: string;
176
+ description: string;
177
+ default: string | null;
178
+ choices: string[];
179
+ };
180
+ readonly safetySettings: {
181
+ type: "object-schema";
182
+ param: string;
183
+ title: string;
184
+ description: string;
185
+ objectSchema?: any;
186
+ };
187
+ };
188
+ schema: zod.ZodObject<{
189
+ temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
190
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
191
+ stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
192
+ topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
193
+ topK: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
194
+ frequencyPenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
195
+ presencePenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
196
+ seed: zod.ZodEffects<zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>, number | undefined, number | undefined>;
197
+ toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
198
+ safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
199
+ [x: string]: any;
200
+ }, {
201
+ [x: string]: any;
202
+ }>>;
203
+ }, "strip", zod.ZodTypeAny, {
204
+ frequencyPenalty?: number | undefined;
205
+ presencePenalty?: number | undefined;
206
+ seed?: number | undefined;
207
+ toolChoice?: string | null | undefined;
208
+ safetySettings?: {
209
+ [x: string]: any;
210
+ } | undefined;
211
+ temperature?: number | undefined;
212
+ topP?: number | undefined;
213
+ topK?: number | undefined;
214
+ maxTokens?: number | undefined;
215
+ stop?: string[] | undefined;
216
+ }, {
217
+ frequencyPenalty?: number | undefined;
218
+ presencePenalty?: number | undefined;
219
+ seed?: number | undefined;
220
+ toolChoice?: string | null | undefined;
221
+ safetySettings?: {
222
+ [x: string]: any;
223
+ } | undefined;
224
+ temperature?: number | undefined;
225
+ topP?: number | undefined;
226
+ topK?: number | undefined;
227
+ maxTokens?: number | undefined;
228
+ stop?: string[] | undefined;
229
+ }>;
230
+ };
231
+ };
232
+ declare const GoogleEmbeddingModelConfigs: {
233
+ readonly base: (maxDimensions: number) => {
234
+ def: {
235
+ readonly dimensions: {
236
+ type: "range";
237
+ param: string;
238
+ title: string;
239
+ description: string;
240
+ max: number;
241
+ min: number;
242
+ step: number;
243
+ default: number;
244
+ };
245
+ };
246
+ schema: zod.ZodObject<{
247
+ dimensions: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
248
+ }, "strip", zod.ZodTypeAny, {
249
+ dimensions?: number | undefined;
250
+ }, {
251
+ dimensions?: number | undefined;
252
+ }>;
253
+ };
254
+ };
255
+
256
+ declare const temperature: (max: number, _default: number) => {
257
+ def: {
258
+ type: "range";
259
+ param: string;
260
+ title: string;
261
+ description: string;
262
+ max: number;
263
+ min: number;
264
+ step: number;
265
+ default: number;
266
+ };
267
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
268
+ };
269
+ declare const maxTokens: (maxOutputTokens: number) => {
270
+ def: {
271
+ type: "range";
272
+ param: string;
273
+ title: string;
274
+ description: string;
275
+ max: number;
276
+ min: number;
277
+ step: number;
278
+ default: number;
279
+ };
280
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
281
+ };
282
+ declare const stop: (maxSequences: number) => {
283
+ def: {
284
+ type: "multi-string";
285
+ param: string;
286
+ title: string;
287
+ description: string;
288
+ max: number;
289
+ };
290
+ schema: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
291
+ };
292
+ declare const topP: (_default: number) => {
293
+ def: {
294
+ type: "range";
295
+ param: string;
296
+ title: string;
297
+ description: string;
298
+ max: number;
299
+ min: number;
300
+ step: number;
301
+ default: number;
302
+ };
303
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
304
+ };
305
+ declare const topK: (_default: number) => {
306
+ def: {
307
+ type: "range";
308
+ param: string;
309
+ title: string;
310
+ description: string;
311
+ max: number;
312
+ min: number;
313
+ step: number;
314
+ default: number;
315
+ };
316
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
317
+ };
318
+ declare const frequencyPenalty: {
319
+ def: {
320
+ type: "range";
321
+ param: string;
322
+ title: string;
323
+ description: string;
324
+ max: number;
325
+ min: number;
326
+ step: number;
327
+ default: number;
328
+ };
329
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
330
+ };
331
+ declare const presencePenalty: {
332
+ def: {
333
+ type: "range";
334
+ param: string;
335
+ title: string;
336
+ description: string;
337
+ max: number;
338
+ min: number;
339
+ step: number;
340
+ default: number;
341
+ };
342
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
343
+ };
344
+ declare const seed: {
345
+ def: {
346
+ type: "range";
347
+ param: string;
348
+ title: string;
349
+ description: string;
350
+ max: number;
351
+ min: number;
352
+ step: number;
353
+ default: number;
354
+ };
355
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
356
+ };
357
+ declare const toolChoice: {
358
+ def: {
359
+ type: "select-string";
360
+ param: string;
361
+ title: string;
362
+ description: string;
363
+ default: string | null;
364
+ choices: string[];
365
+ };
366
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
367
+ };
368
+ declare const safetySettings: {
369
+ def: {
370
+ type: "object-schema";
371
+ param: string;
372
+ title: string;
373
+ description: string;
374
+ objectSchema?: any;
375
+ };
376
+ schema: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
377
+ [x: string]: any;
378
+ }, {
379
+ [x: string]: any;
380
+ }>>;
381
+ };
382
+
383
+ declare const ChatModelBaseConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => z.ZodObject<{
384
+ temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
385
+ maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
386
+ stop: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
387
+ topP: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
388
+ toolChoice: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
389
+ safetySettings: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
390
+ [x: string]: any;
391
+ }, {
392
+ [x: string]: any;
393
+ }>>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ toolChoice?: string | null | undefined;
396
+ safetySettings?: {
397
+ [x: string]: any;
398
+ } | undefined;
399
+ temperature?: number | undefined;
400
+ topP?: number | undefined;
401
+ maxTokens?: number | undefined;
402
+ stop?: string[] | undefined;
403
+ }, {
404
+ toolChoice?: string | null | undefined;
405
+ safetySettings?: {
406
+ [x: string]: any;
407
+ } | undefined;
408
+ temperature?: number | undefined;
409
+ topP?: number | undefined;
410
+ maxTokens?: number | undefined;
411
+ stop?: string[] | undefined;
412
+ }>;
413
+ declare const ChatModelBaseConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
414
+ readonly temperature: {
415
+ type: "range";
416
+ param: string;
417
+ title: string;
418
+ description: string;
419
+ max: number;
420
+ min: number;
421
+ step: number;
422
+ default: number;
423
+ };
424
+ readonly maxTokens: {
425
+ type: "range";
426
+ param: string;
427
+ title: string;
428
+ description: string;
429
+ max: number;
430
+ min: number;
431
+ step: number;
432
+ default: number;
433
+ };
434
+ readonly stop: {
435
+ type: "multi-string";
436
+ param: string;
437
+ title: string;
438
+ description: string;
439
+ max: number;
440
+ };
441
+ readonly topP: {
442
+ type: "range";
443
+ param: string;
444
+ title: string;
445
+ description: string;
446
+ max: number;
447
+ min: number;
448
+ step: number;
449
+ default: number;
450
+ };
451
+ readonly toolChoice: {
452
+ type: "select-string";
453
+ param: string;
454
+ title: string;
455
+ description: string;
456
+ default: string | null;
457
+ choices: string[];
458
+ };
459
+ readonly safetySettings: {
460
+ type: "object-schema";
461
+ param: string;
462
+ title: string;
463
+ description: string;
464
+ objectSchema?: any;
465
+ };
466
+ };
467
+
468
+ declare const ChatModelC1ConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => z.ZodObject<{
469
+ temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
470
+ maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
471
+ stop: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
472
+ topP: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
473
+ topK: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
474
+ frequencyPenalty: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
475
+ presencePenalty: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
476
+ seed: z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodNumber>>, number | undefined, number | undefined>;
477
+ toolChoice: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
478
+ safetySettings: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
479
+ [x: string]: any;
480
+ }, {
481
+ [x: string]: any;
482
+ }>>;
483
+ }, "strip", z.ZodTypeAny, {
484
+ frequencyPenalty?: number | undefined;
485
+ presencePenalty?: number | undefined;
486
+ seed?: number | undefined;
487
+ toolChoice?: string | null | undefined;
488
+ safetySettings?: {
489
+ [x: string]: any;
490
+ } | undefined;
491
+ temperature?: number | undefined;
492
+ topP?: number | undefined;
493
+ topK?: number | undefined;
494
+ maxTokens?: number | undefined;
495
+ stop?: string[] | undefined;
496
+ }, {
497
+ frequencyPenalty?: number | undefined;
498
+ presencePenalty?: number | undefined;
499
+ seed?: number | undefined;
500
+ toolChoice?: string | null | undefined;
501
+ safetySettings?: {
502
+ [x: string]: any;
503
+ } | undefined;
504
+ temperature?: number | undefined;
505
+ topP?: number | undefined;
506
+ topK?: number | undefined;
507
+ maxTokens?: number | undefined;
508
+ stop?: string[] | undefined;
509
+ }>;
510
+ declare const ChatModelC1ConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => {
511
+ readonly temperature: {
512
+ type: "range";
513
+ param: string;
514
+ title: string;
515
+ description: string;
516
+ max: number;
517
+ min: number;
518
+ step: number;
519
+ default: number;
520
+ };
521
+ readonly maxTokens: {
522
+ type: "range";
523
+ param: string;
524
+ title: string;
525
+ description: string;
526
+ max: number;
527
+ min: number;
528
+ step: number;
529
+ default: number;
530
+ };
531
+ readonly stop: {
532
+ type: "multi-string";
533
+ param: string;
534
+ title: string;
535
+ description: string;
536
+ max: number;
537
+ };
538
+ readonly topP: {
539
+ type: "range";
540
+ param: string;
541
+ title: string;
542
+ description: string;
543
+ max: number;
544
+ min: number;
545
+ step: number;
546
+ default: number;
547
+ };
548
+ readonly topK: {
549
+ type: "range";
550
+ param: string;
551
+ title: string;
552
+ description: string;
553
+ max: number;
554
+ min: number;
555
+ step: number;
556
+ default: number;
557
+ };
558
+ readonly frequencyPenalty: {
559
+ type: "range";
560
+ param: string;
561
+ title: string;
562
+ description: string;
563
+ max: number;
564
+ min: number;
565
+ step: number;
566
+ default: number;
567
+ };
568
+ readonly presencePenalty: {
569
+ type: "range";
570
+ param: string;
571
+ title: string;
572
+ description: string;
573
+ max: number;
574
+ min: number;
575
+ step: number;
576
+ default: number;
577
+ };
578
+ readonly seed: {
579
+ type: "range";
580
+ param: string;
581
+ title: string;
582
+ description: string;
583
+ max: number;
584
+ min: number;
585
+ step: number;
586
+ default: number;
587
+ };
588
+ readonly toolChoice: {
589
+ type: "select-string";
590
+ param: string;
591
+ title: string;
592
+ description: string;
593
+ default: string | null;
594
+ choices: string[];
595
+ };
596
+ readonly safetySettings: {
597
+ type: "object-schema";
598
+ param: string;
599
+ title: string;
600
+ description: string;
601
+ objectSchema?: any;
602
+ };
603
+ };
604
+
605
+ declare const EmbeddingModelBaseConfigSchema: (maxDimensions: number) => z.ZodObject<{
606
+ dimensions: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
607
+ }, "strip", z.ZodTypeAny, {
608
+ dimensions?: number | undefined;
609
+ }, {
610
+ dimensions?: number | undefined;
611
+ }>;
612
+ declare const EmbeddingModelBaseConfigDef: (maxDimensions: number) => {
613
+ readonly dimensions: {
614
+ type: "range";
615
+ param: string;
616
+ title: string;
617
+ description: string;
618
+ max: number;
619
+ min: number;
620
+ step: number;
621
+ default: number;
622
+ };
623
+ };
624
+
625
+ declare const dimensions: (maxDimensions: number) => {
626
+ def: {
627
+ type: "range";
628
+ param: string;
629
+ title: string;
630
+ description: string;
631
+ max: number;
632
+ min: number;
633
+ step: number;
634
+ default: number;
635
+ };
636
+ schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
637
+ };
638
+
639
+ declare const GoogleChatModelRoles: z.ZodEnum<["system", "user", "assistant", "tool"]>;
640
+ declare const GoogleChatAssistantRoleLiteral = "model";
641
+ declare const GoogleChatToolRoleLiteral = "function";
642
+ declare const GoogleChatModelRolesMap: {
643
+ readonly system: "user";
644
+ readonly user: "user";
645
+ readonly assistant: "model";
646
+ readonly tool: "function";
647
+ };
648
+
649
+ declare const GoogleChatModelModalities: ChatModelSchemaType["modalities"];
650
+ declare const GoogleChatModelModalitiesEnum: z.ZodEnum<["text", "image", "tool-call", "tool-response"]>;
651
+ declare const GoogleChatModelTextModalities: ChatModelSchemaType["modalities"];
652
+ declare const GoogleChatModelTextModalitiesEnum: z.ZodEnum<["text"]>;
653
+ declare const GoogleChatModelTextVisionModalities: ChatModelSchemaType["modalities"];
654
+ declare const GoogleChatModelTextVisionModalitiesEnum: z.ZodEnum<["text", "image"]>;
655
+ declare const GoogleChatModelTextToolModalities: ChatModelSchemaType["modalities"];
656
+ declare const GoogleChatModelTextToolModalitiesEnum: z.ZodEnum<["text", "tool-call", "tool-response"]>;
657
+
658
+ declare const GoogleCompleteChatTextResponse: z.ZodObject<{
659
+ text: z.ZodString;
660
+ }, "strip", z.ZodTypeAny, {
661
+ text: string;
662
+ }, {
663
+ text: string;
664
+ }>;
665
+ declare const GoogleCompleteChatToolResponse: z.ZodObject<{
666
+ functionCall: z.ZodObject<{
667
+ name: z.ZodString;
668
+ args: z.ZodRecord<z.ZodString, z.ZodAny>;
669
+ }, "strip", z.ZodTypeAny, {
670
+ name: string;
671
+ args: Record<string, any>;
672
+ }, {
673
+ name: string;
674
+ args: Record<string, any>;
675
+ }>;
676
+ }, "strip", z.ZodTypeAny, {
677
+ functionCall: {
678
+ name: string;
679
+ args: Record<string, any>;
680
+ };
681
+ }, {
682
+ functionCall: {
683
+ name: string;
684
+ args: Record<string, any>;
685
+ };
686
+ }>;
687
+ declare const GoogleCompleteChatResponse: z.ZodObject<{
688
+ candidates: z.ZodArray<z.ZodObject<{
689
+ content: z.ZodOptional<z.ZodObject<{
690
+ role: z.ZodString;
691
+ parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
692
+ text: z.ZodString;
693
+ }, "strip", z.ZodTypeAny, {
694
+ text: string;
695
+ }, {
696
+ text: string;
697
+ }>, z.ZodObject<{
698
+ functionCall: z.ZodObject<{
699
+ name: z.ZodString;
700
+ args: z.ZodRecord<z.ZodString, z.ZodAny>;
701
+ }, "strip", z.ZodTypeAny, {
702
+ name: string;
703
+ args: Record<string, any>;
704
+ }, {
705
+ name: string;
706
+ args: Record<string, any>;
707
+ }>;
708
+ }, "strip", z.ZodTypeAny, {
709
+ functionCall: {
710
+ name: string;
711
+ args: Record<string, any>;
712
+ };
713
+ }, {
714
+ functionCall: {
715
+ name: string;
716
+ args: Record<string, any>;
717
+ };
718
+ }>]>, "many">;
719
+ }, "strip", z.ZodTypeAny, {
720
+ role: string;
721
+ parts: ({
722
+ text: string;
723
+ } | {
724
+ functionCall: {
725
+ name: string;
726
+ args: Record<string, any>;
727
+ };
728
+ })[];
729
+ }, {
730
+ role: string;
731
+ parts: ({
732
+ text: string;
733
+ } | {
734
+ functionCall: {
735
+ name: string;
736
+ args: Record<string, any>;
737
+ };
738
+ })[];
739
+ }>>;
740
+ finishReason: z.ZodString;
741
+ index: z.ZodOptional<z.ZodNumber>;
742
+ safetyRatings: z.ZodOptional<z.ZodArray<z.ZodObject<{
743
+ category: z.ZodString;
744
+ probability: z.ZodString;
745
+ blocked: z.ZodOptional<z.ZodBoolean>;
746
+ }, "strip", z.ZodTypeAny, {
747
+ category: string;
748
+ probability: string;
749
+ blocked?: boolean | undefined;
750
+ }, {
751
+ category: string;
752
+ probability: string;
753
+ blocked?: boolean | undefined;
754
+ }>, "many">>;
755
+ }, "strip", z.ZodTypeAny, {
756
+ finishReason: string;
757
+ content?: {
758
+ role: string;
759
+ parts: ({
760
+ text: string;
761
+ } | {
762
+ functionCall: {
763
+ name: string;
764
+ args: Record<string, any>;
765
+ };
766
+ })[];
767
+ } | undefined;
768
+ index?: number | undefined;
769
+ safetyRatings?: {
770
+ category: string;
771
+ probability: string;
772
+ blocked?: boolean | undefined;
773
+ }[] | undefined;
774
+ }, {
775
+ finishReason: string;
776
+ content?: {
777
+ role: string;
778
+ parts: ({
779
+ text: string;
780
+ } | {
781
+ functionCall: {
782
+ name: string;
783
+ args: Record<string, any>;
784
+ };
785
+ })[];
786
+ } | undefined;
787
+ index?: number | undefined;
788
+ safetyRatings?: {
789
+ category: string;
790
+ probability: string;
791
+ blocked?: boolean | undefined;
792
+ }[] | undefined;
793
+ }>, "many">;
794
+ promptFeedback: z.ZodOptional<z.ZodObject<{
795
+ safetyRatings: z.ZodOptional<z.ZodArray<z.ZodObject<{
796
+ category: z.ZodString;
797
+ probability: z.ZodString;
798
+ }, "strip", z.ZodTypeAny, {
799
+ category: string;
800
+ probability: string;
801
+ }, {
802
+ category: string;
803
+ probability: string;
804
+ }>, "many">>;
805
+ }, "strip", z.ZodTypeAny, {
806
+ safetyRatings?: {
807
+ category: string;
808
+ probability: string;
809
+ }[] | undefined;
810
+ }, {
811
+ safetyRatings?: {
812
+ category: string;
813
+ probability: string;
814
+ }[] | undefined;
815
+ }>>;
816
+ usageMetadata: z.ZodOptional<z.ZodObject<{
817
+ promptTokenCount: z.ZodNumber;
818
+ cachedContentTokenCount: z.ZodOptional<z.ZodNumber>;
819
+ candidatesTokenCount: z.ZodOptional<z.ZodNumber>;
820
+ totalTokenCount: z.ZodNumber;
821
+ }, "strip", z.ZodTypeAny, {
822
+ promptTokenCount: number;
823
+ totalTokenCount: number;
824
+ cachedContentTokenCount?: number | undefined;
825
+ candidatesTokenCount?: number | undefined;
826
+ }, {
827
+ promptTokenCount: number;
828
+ totalTokenCount: number;
829
+ cachedContentTokenCount?: number | undefined;
830
+ candidatesTokenCount?: number | undefined;
831
+ }>>;
832
+ }, "strip", z.ZodTypeAny, {
833
+ candidates: {
834
+ finishReason: string;
835
+ content?: {
836
+ role: string;
837
+ parts: ({
838
+ text: string;
839
+ } | {
840
+ functionCall: {
841
+ name: string;
842
+ args: Record<string, any>;
843
+ };
844
+ })[];
845
+ } | undefined;
846
+ index?: number | undefined;
847
+ safetyRatings?: {
848
+ category: string;
849
+ probability: string;
850
+ blocked?: boolean | undefined;
851
+ }[] | undefined;
852
+ }[];
853
+ promptFeedback?: {
854
+ safetyRatings?: {
855
+ category: string;
856
+ probability: string;
857
+ }[] | undefined;
858
+ } | undefined;
859
+ usageMetadata?: {
860
+ promptTokenCount: number;
861
+ totalTokenCount: number;
862
+ cachedContentTokenCount?: number | undefined;
863
+ candidatesTokenCount?: number | undefined;
864
+ } | undefined;
865
+ }, {
866
+ candidates: {
867
+ finishReason: string;
868
+ content?: {
869
+ role: string;
870
+ parts: ({
871
+ text: string;
872
+ } | {
873
+ functionCall: {
874
+ name: string;
875
+ args: Record<string, any>;
876
+ };
877
+ })[];
878
+ } | undefined;
879
+ index?: number | undefined;
880
+ safetyRatings?: {
881
+ category: string;
882
+ probability: string;
883
+ blocked?: boolean | undefined;
884
+ }[] | undefined;
885
+ }[];
886
+ promptFeedback?: {
887
+ safetyRatings?: {
888
+ category: string;
889
+ probability: string;
890
+ }[] | undefined;
891
+ } | undefined;
892
+ usageMetadata?: {
893
+ promptTokenCount: number;
894
+ totalTokenCount: number;
895
+ cachedContentTokenCount?: number | undefined;
896
+ candidatesTokenCount?: number | undefined;
897
+ } | undefined;
898
+ }>;
899
+ type GoogleCompleteChatResponseType = z.infer<typeof GoogleCompleteChatResponse>;
900
+ declare const GoogleStreamChatTextResponse: z.ZodObject<{
901
+ text: z.ZodString;
902
+ }, "strip", z.ZodTypeAny, {
903
+ text: string;
904
+ }, {
905
+ text: string;
906
+ }>;
907
+ declare const GoogleStreamChatToolResponse: z.ZodObject<{
908
+ functionCall: z.ZodObject<{
909
+ name: z.ZodString;
910
+ args: z.ZodRecord<z.ZodString, z.ZodAny>;
911
+ }, "strip", z.ZodTypeAny, {
912
+ name: string;
913
+ args: Record<string, any>;
914
+ }, {
915
+ name: string;
916
+ args: Record<string, any>;
917
+ }>;
918
+ }, "strip", z.ZodTypeAny, {
919
+ functionCall: {
920
+ name: string;
921
+ args: Record<string, any>;
922
+ };
923
+ }, {
924
+ functionCall: {
925
+ name: string;
926
+ args: Record<string, any>;
927
+ };
928
+ }>;
929
+ declare const GoogleStreamChatResponse: z.ZodObject<{
930
+ candidates: z.ZodArray<z.ZodObject<{
931
+ content: z.ZodOptional<z.ZodObject<{
932
+ role: z.ZodString;
933
+ parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
934
+ text: z.ZodString;
935
+ }, "strip", z.ZodTypeAny, {
936
+ text: string;
937
+ }, {
938
+ text: string;
939
+ }>, z.ZodObject<{
940
+ functionCall: z.ZodObject<{
941
+ name: z.ZodString;
942
+ args: z.ZodRecord<z.ZodString, z.ZodAny>;
943
+ }, "strip", z.ZodTypeAny, {
944
+ name: string;
945
+ args: Record<string, any>;
946
+ }, {
947
+ name: string;
948
+ args: Record<string, any>;
949
+ }>;
950
+ }, "strip", z.ZodTypeAny, {
951
+ functionCall: {
952
+ name: string;
953
+ args: Record<string, any>;
954
+ };
955
+ }, {
956
+ functionCall: {
957
+ name: string;
958
+ args: Record<string, any>;
959
+ };
960
+ }>]>, "many">;
961
+ }, "strip", z.ZodTypeAny, {
962
+ role: string;
963
+ parts: ({
964
+ text: string;
965
+ } | {
966
+ functionCall: {
967
+ name: string;
968
+ args: Record<string, any>;
969
+ };
970
+ })[];
971
+ }, {
972
+ role: string;
973
+ parts: ({
974
+ text: string;
975
+ } | {
976
+ functionCall: {
977
+ name: string;
978
+ args: Record<string, any>;
979
+ };
980
+ })[];
981
+ }>>;
982
+ finishReason: z.ZodOptional<z.ZodString>;
983
+ index: z.ZodOptional<z.ZodNumber>;
984
+ safetyRatings: z.ZodOptional<z.ZodArray<z.ZodObject<{
985
+ category: z.ZodString;
986
+ probability: z.ZodString;
987
+ blocked: z.ZodOptional<z.ZodBoolean>;
988
+ }, "strip", z.ZodTypeAny, {
989
+ category: string;
990
+ probability: string;
991
+ blocked?: boolean | undefined;
992
+ }, {
993
+ category: string;
994
+ probability: string;
995
+ blocked?: boolean | undefined;
996
+ }>, "many">>;
997
+ }, "strip", z.ZodTypeAny, {
998
+ content?: {
999
+ role: string;
1000
+ parts: ({
1001
+ text: string;
1002
+ } | {
1003
+ functionCall: {
1004
+ name: string;
1005
+ args: Record<string, any>;
1006
+ };
1007
+ })[];
1008
+ } | undefined;
1009
+ finishReason?: string | undefined;
1010
+ index?: number | undefined;
1011
+ safetyRatings?: {
1012
+ category: string;
1013
+ probability: string;
1014
+ blocked?: boolean | undefined;
1015
+ }[] | undefined;
1016
+ }, {
1017
+ content?: {
1018
+ role: string;
1019
+ parts: ({
1020
+ text: string;
1021
+ } | {
1022
+ functionCall: {
1023
+ name: string;
1024
+ args: Record<string, any>;
1025
+ };
1026
+ })[];
1027
+ } | undefined;
1028
+ finishReason?: string | undefined;
1029
+ index?: number | undefined;
1030
+ safetyRatings?: {
1031
+ category: string;
1032
+ probability: string;
1033
+ blocked?: boolean | undefined;
1034
+ }[] | undefined;
1035
+ }>, "many">;
1036
+ promptFeedback: z.ZodOptional<z.ZodObject<{
1037
+ safetyRatings: z.ZodOptional<z.ZodArray<z.ZodObject<{
1038
+ category: z.ZodString;
1039
+ probability: z.ZodString;
1040
+ }, "strip", z.ZodTypeAny, {
1041
+ category: string;
1042
+ probability: string;
1043
+ }, {
1044
+ category: string;
1045
+ probability: string;
1046
+ }>, "many">>;
1047
+ }, "strip", z.ZodTypeAny, {
1048
+ safetyRatings?: {
1049
+ category: string;
1050
+ probability: string;
1051
+ }[] | undefined;
1052
+ }, {
1053
+ safetyRatings?: {
1054
+ category: string;
1055
+ probability: string;
1056
+ }[] | undefined;
1057
+ }>>;
1058
+ usageMetadata: z.ZodOptional<z.ZodObject<{
1059
+ promptTokenCount: z.ZodNumber;
1060
+ cachedContentTokenCount: z.ZodOptional<z.ZodNumber>;
1061
+ candidatesTokenCount: z.ZodNumber;
1062
+ totalTokenCount: z.ZodNumber;
1063
+ }, "strip", z.ZodTypeAny, {
1064
+ promptTokenCount: number;
1065
+ candidatesTokenCount: number;
1066
+ totalTokenCount: number;
1067
+ cachedContentTokenCount?: number | undefined;
1068
+ }, {
1069
+ promptTokenCount: number;
1070
+ candidatesTokenCount: number;
1071
+ totalTokenCount: number;
1072
+ cachedContentTokenCount?: number | undefined;
1073
+ }>>;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ candidates: {
1076
+ content?: {
1077
+ role: string;
1078
+ parts: ({
1079
+ text: string;
1080
+ } | {
1081
+ functionCall: {
1082
+ name: string;
1083
+ args: Record<string, any>;
1084
+ };
1085
+ })[];
1086
+ } | undefined;
1087
+ finishReason?: string | undefined;
1088
+ index?: number | undefined;
1089
+ safetyRatings?: {
1090
+ category: string;
1091
+ probability: string;
1092
+ blocked?: boolean | undefined;
1093
+ }[] | undefined;
1094
+ }[];
1095
+ promptFeedback?: {
1096
+ safetyRatings?: {
1097
+ category: string;
1098
+ probability: string;
1099
+ }[] | undefined;
1100
+ } | undefined;
1101
+ usageMetadata?: {
1102
+ promptTokenCount: number;
1103
+ candidatesTokenCount: number;
1104
+ totalTokenCount: number;
1105
+ cachedContentTokenCount?: number | undefined;
1106
+ } | undefined;
1107
+ }, {
1108
+ candidates: {
1109
+ content?: {
1110
+ role: string;
1111
+ parts: ({
1112
+ text: string;
1113
+ } | {
1114
+ functionCall: {
1115
+ name: string;
1116
+ args: Record<string, any>;
1117
+ };
1118
+ })[];
1119
+ } | undefined;
1120
+ finishReason?: string | undefined;
1121
+ index?: number | undefined;
1122
+ safetyRatings?: {
1123
+ category: string;
1124
+ probability: string;
1125
+ blocked?: boolean | undefined;
1126
+ }[] | undefined;
1127
+ }[];
1128
+ promptFeedback?: {
1129
+ safetyRatings?: {
1130
+ category: string;
1131
+ probability: string;
1132
+ }[] | undefined;
1133
+ } | undefined;
1134
+ usageMetadata?: {
1135
+ promptTokenCount: number;
1136
+ candidatesTokenCount: number;
1137
+ totalTokenCount: number;
1138
+ cachedContentTokenCount?: number | undefined;
1139
+ } | undefined;
1140
+ }>;
1141
+ type GoogleStreamChatResponseType = z.infer<typeof GoogleStreamChatResponse>;
1142
+
1143
+ declare const GoogleChatContentPartText: z.ZodObject<{
1144
+ text: z.ZodString;
1145
+ }, "strip", z.ZodTypeAny, {
1146
+ text: string;
1147
+ }, {
1148
+ text: string;
1149
+ }>;
1150
+ type GoogleChatContentPartTextType = z.infer<typeof GoogleChatContentPartText>;
1151
+ declare const GoogleChatContentPartInlineData: z.ZodObject<{
1152
+ inline_data: z.ZodObject<{
1153
+ mime_type: z.ZodString;
1154
+ data: z.ZodString;
1155
+ }, "strip", z.ZodTypeAny, {
1156
+ mime_type: string;
1157
+ data: string;
1158
+ }, {
1159
+ mime_type: string;
1160
+ data: string;
1161
+ }>;
1162
+ }, "strip", z.ZodTypeAny, {
1163
+ inline_data: {
1164
+ mime_type: string;
1165
+ data: string;
1166
+ };
1167
+ }, {
1168
+ inline_data: {
1169
+ mime_type: string;
1170
+ data: string;
1171
+ };
1172
+ }>;
1173
+ type GoogleChatContentPartInlineDataType = z.infer<typeof GoogleChatContentPartInlineData>;
1174
+ declare const GoogleChatContentPartFunctionCall: z.ZodObject<{
1175
+ function_call: z.ZodObject<{
1176
+ name: z.ZodString;
1177
+ args: z.ZodRecord<z.ZodString, z.ZodString>;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ name: string;
1180
+ args: Record<string, string>;
1181
+ }, {
1182
+ name: string;
1183
+ args: Record<string, string>;
1184
+ }>;
1185
+ }, "strip", z.ZodTypeAny, {
1186
+ function_call: {
1187
+ name: string;
1188
+ args: Record<string, string>;
1189
+ };
1190
+ }, {
1191
+ function_call: {
1192
+ name: string;
1193
+ args: Record<string, string>;
1194
+ };
1195
+ }>;
1196
+ type GoogleChatContentPartFunctionCallType = z.infer<typeof GoogleChatContentPartFunctionCall>;
1197
+ declare const GoogleChatContentPartFunctionResponse: z.ZodObject<{
1198
+ function_response: z.ZodObject<{
1199
+ name: z.ZodString;
1200
+ response: z.ZodRecord<z.ZodString, z.ZodString>;
1201
+ }, "strip", z.ZodTypeAny, {
1202
+ name: string;
1203
+ response: Record<string, string>;
1204
+ }, {
1205
+ name: string;
1206
+ response: Record<string, string>;
1207
+ }>;
1208
+ }, "strip", z.ZodTypeAny, {
1209
+ function_response: {
1210
+ name: string;
1211
+ response: Record<string, string>;
1212
+ };
1213
+ }, {
1214
+ function_response: {
1215
+ name: string;
1216
+ response: Record<string, string>;
1217
+ };
1218
+ }>;
1219
+ type GoogleChatContentPartFunctionResponseType = z.infer<typeof GoogleChatContentPartFunctionResponse>;
1220
+ declare const GoogleChatContent: z.ZodObject<{
1221
+ role: z.ZodEnum<["user", "model", "function"]>;
1222
+ parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1223
+ text: z.ZodString;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ text: string;
1226
+ }, {
1227
+ text: string;
1228
+ }>, z.ZodObject<{
1229
+ inline_data: z.ZodObject<{
1230
+ mime_type: z.ZodString;
1231
+ data: z.ZodString;
1232
+ }, "strip", z.ZodTypeAny, {
1233
+ mime_type: string;
1234
+ data: string;
1235
+ }, {
1236
+ mime_type: string;
1237
+ data: string;
1238
+ }>;
1239
+ }, "strip", z.ZodTypeAny, {
1240
+ inline_data: {
1241
+ mime_type: string;
1242
+ data: string;
1243
+ };
1244
+ }, {
1245
+ inline_data: {
1246
+ mime_type: string;
1247
+ data: string;
1248
+ };
1249
+ }>, z.ZodObject<{
1250
+ function_call: z.ZodObject<{
1251
+ name: z.ZodString;
1252
+ args: z.ZodRecord<z.ZodString, z.ZodString>;
1253
+ }, "strip", z.ZodTypeAny, {
1254
+ name: string;
1255
+ args: Record<string, string>;
1256
+ }, {
1257
+ name: string;
1258
+ args: Record<string, string>;
1259
+ }>;
1260
+ }, "strip", z.ZodTypeAny, {
1261
+ function_call: {
1262
+ name: string;
1263
+ args: Record<string, string>;
1264
+ };
1265
+ }, {
1266
+ function_call: {
1267
+ name: string;
1268
+ args: Record<string, string>;
1269
+ };
1270
+ }>, z.ZodObject<{
1271
+ function_response: z.ZodObject<{
1272
+ name: z.ZodString;
1273
+ response: z.ZodRecord<z.ZodString, z.ZodString>;
1274
+ }, "strip", z.ZodTypeAny, {
1275
+ name: string;
1276
+ response: Record<string, string>;
1277
+ }, {
1278
+ name: string;
1279
+ response: Record<string, string>;
1280
+ }>;
1281
+ }, "strip", z.ZodTypeAny, {
1282
+ function_response: {
1283
+ name: string;
1284
+ response: Record<string, string>;
1285
+ };
1286
+ }, {
1287
+ function_response: {
1288
+ name: string;
1289
+ response: Record<string, string>;
1290
+ };
1291
+ }>]>, "many">;
1292
+ }, "strip", z.ZodTypeAny, {
1293
+ role: "function" | "user" | "model";
1294
+ parts: ({
1295
+ text: string;
1296
+ } | {
1297
+ inline_data: {
1298
+ mime_type: string;
1299
+ data: string;
1300
+ };
1301
+ } | {
1302
+ function_call: {
1303
+ name: string;
1304
+ args: Record<string, string>;
1305
+ };
1306
+ } | {
1307
+ function_response: {
1308
+ name: string;
1309
+ response: Record<string, string>;
1310
+ };
1311
+ })[];
1312
+ }, {
1313
+ role: "function" | "user" | "model";
1314
+ parts: ({
1315
+ text: string;
1316
+ } | {
1317
+ inline_data: {
1318
+ mime_type: string;
1319
+ data: string;
1320
+ };
1321
+ } | {
1322
+ function_call: {
1323
+ name: string;
1324
+ args: Record<string, string>;
1325
+ };
1326
+ } | {
1327
+ function_response: {
1328
+ name: string;
1329
+ response: Record<string, string>;
1330
+ };
1331
+ })[];
1332
+ }>;
1333
+ type GoogleChatContentType = z.infer<typeof GoogleChatContent>;
1334
+ declare const GoogleChatSystemInstruction: z.ZodObject<{
1335
+ parts: z.ZodArray<z.ZodObject<{
1336
+ text: z.ZodString;
1337
+ }, "strip", z.ZodTypeAny, {
1338
+ text: string;
1339
+ }, {
1340
+ text: string;
1341
+ }>, "many">;
1342
+ }, "strip", z.ZodTypeAny, {
1343
+ parts: {
1344
+ text: string;
1345
+ }[];
1346
+ }, {
1347
+ parts: {
1348
+ text: string;
1349
+ }[];
1350
+ }>;
1351
+ type GoogleChatSystemInstructionType = z.infer<typeof GoogleChatSystemInstruction>;
1352
+ declare const GoogleChatTool: z.ZodObject<{
1353
+ name: z.ZodString;
1354
+ description: z.ZodString;
1355
+ parameters: z.ZodAny;
1356
+ }, "strip", z.ZodTypeAny, {
1357
+ description: string;
1358
+ name: string;
1359
+ parameters?: any;
1360
+ }, {
1361
+ description: string;
1362
+ name: string;
1363
+ parameters?: any;
1364
+ }>;
1365
+ type GoogleChatToolType = z.infer<typeof GoogleChatTool>;
1366
+ declare const GoogleChatToolConfig: z.ZodObject<{
1367
+ function_calling_config: z.ZodObject<{
1368
+ mode: z.ZodEnum<["ANY", "AUTO", "NONE"]>;
1369
+ allowed_function_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1370
+ }, "strip", z.ZodTypeAny, {
1371
+ mode: "ANY" | "AUTO" | "NONE";
1372
+ allowed_function_names?: string[] | undefined;
1373
+ }, {
1374
+ mode: "ANY" | "AUTO" | "NONE";
1375
+ allowed_function_names?: string[] | undefined;
1376
+ }>;
1377
+ }, "strip", z.ZodTypeAny, {
1378
+ function_calling_config: {
1379
+ mode: "ANY" | "AUTO" | "NONE";
1380
+ allowed_function_names?: string[] | undefined;
1381
+ };
1382
+ }, {
1383
+ function_calling_config: {
1384
+ mode: "ANY" | "AUTO" | "NONE";
1385
+ allowed_function_names?: string[] | undefined;
1386
+ };
1387
+ }>;
1388
+ type GoogleChatToolConfigType = z.infer<typeof GoogleChatToolConfig>;
1389
+ declare const GoogleChatGenerationConfig: z.ZodObject<{
1390
+ stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1391
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
1392
+ temperature: z.ZodOptional<z.ZodNumber>;
1393
+ topP: z.ZodOptional<z.ZodNumber>;
1394
+ topK: z.ZodOptional<z.ZodNumber>;
1395
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
1396
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
1397
+ seed: z.ZodOptional<z.ZodNumber>;
1398
+ }, "strip", z.ZodTypeAny, {
1399
+ frequencyPenalty?: number | undefined;
1400
+ presencePenalty?: number | undefined;
1401
+ seed?: number | undefined;
1402
+ temperature?: number | undefined;
1403
+ maxOutputTokens?: number | undefined;
1404
+ stopSequences?: string[] | undefined;
1405
+ topP?: number | undefined;
1406
+ topK?: number | undefined;
1407
+ }, {
1408
+ frequencyPenalty?: number | undefined;
1409
+ presencePenalty?: number | undefined;
1410
+ seed?: number | undefined;
1411
+ temperature?: number | undefined;
1412
+ maxOutputTokens?: number | undefined;
1413
+ stopSequences?: string[] | undefined;
1414
+ topP?: number | undefined;
1415
+ topK?: number | undefined;
1416
+ }>;
1417
+ type GoogleChatGenerationConfigType = z.infer<typeof GoogleChatGenerationConfig>;
1418
+ declare const GoogleChatRequest: z.ZodObject<{
1419
+ model: z.ZodOptional<z.ZodString>;
1420
+ contents: z.ZodArray<z.ZodObject<{
1421
+ role: z.ZodEnum<["user", "model", "function"]>;
1422
+ parts: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1423
+ text: z.ZodString;
1424
+ }, "strip", z.ZodTypeAny, {
1425
+ text: string;
1426
+ }, {
1427
+ text: string;
1428
+ }>, z.ZodObject<{
1429
+ inline_data: z.ZodObject<{
1430
+ mime_type: z.ZodString;
1431
+ data: z.ZodString;
1432
+ }, "strip", z.ZodTypeAny, {
1433
+ mime_type: string;
1434
+ data: string;
1435
+ }, {
1436
+ mime_type: string;
1437
+ data: string;
1438
+ }>;
1439
+ }, "strip", z.ZodTypeAny, {
1440
+ inline_data: {
1441
+ mime_type: string;
1442
+ data: string;
1443
+ };
1444
+ }, {
1445
+ inline_data: {
1446
+ mime_type: string;
1447
+ data: string;
1448
+ };
1449
+ }>, z.ZodObject<{
1450
+ function_call: z.ZodObject<{
1451
+ name: z.ZodString;
1452
+ args: z.ZodRecord<z.ZodString, z.ZodString>;
1453
+ }, "strip", z.ZodTypeAny, {
1454
+ name: string;
1455
+ args: Record<string, string>;
1456
+ }, {
1457
+ name: string;
1458
+ args: Record<string, string>;
1459
+ }>;
1460
+ }, "strip", z.ZodTypeAny, {
1461
+ function_call: {
1462
+ name: string;
1463
+ args: Record<string, string>;
1464
+ };
1465
+ }, {
1466
+ function_call: {
1467
+ name: string;
1468
+ args: Record<string, string>;
1469
+ };
1470
+ }>, z.ZodObject<{
1471
+ function_response: z.ZodObject<{
1472
+ name: z.ZodString;
1473
+ response: z.ZodRecord<z.ZodString, z.ZodString>;
1474
+ }, "strip", z.ZodTypeAny, {
1475
+ name: string;
1476
+ response: Record<string, string>;
1477
+ }, {
1478
+ name: string;
1479
+ response: Record<string, string>;
1480
+ }>;
1481
+ }, "strip", z.ZodTypeAny, {
1482
+ function_response: {
1483
+ name: string;
1484
+ response: Record<string, string>;
1485
+ };
1486
+ }, {
1487
+ function_response: {
1488
+ name: string;
1489
+ response: Record<string, string>;
1490
+ };
1491
+ }>]>, "many">;
1492
+ }, "strip", z.ZodTypeAny, {
1493
+ role: "function" | "user" | "model";
1494
+ parts: ({
1495
+ text: string;
1496
+ } | {
1497
+ inline_data: {
1498
+ mime_type: string;
1499
+ data: string;
1500
+ };
1501
+ } | {
1502
+ function_call: {
1503
+ name: string;
1504
+ args: Record<string, string>;
1505
+ };
1506
+ } | {
1507
+ function_response: {
1508
+ name: string;
1509
+ response: Record<string, string>;
1510
+ };
1511
+ })[];
1512
+ }, {
1513
+ role: "function" | "user" | "model";
1514
+ parts: ({
1515
+ text: string;
1516
+ } | {
1517
+ inline_data: {
1518
+ mime_type: string;
1519
+ data: string;
1520
+ };
1521
+ } | {
1522
+ function_call: {
1523
+ name: string;
1524
+ args: Record<string, string>;
1525
+ };
1526
+ } | {
1527
+ function_response: {
1528
+ name: string;
1529
+ response: Record<string, string>;
1530
+ };
1531
+ })[];
1532
+ }>, "many">;
1533
+ systemInstruction: z.ZodOptional<z.ZodObject<{
1534
+ parts: z.ZodArray<z.ZodObject<{
1535
+ text: z.ZodString;
1536
+ }, "strip", z.ZodTypeAny, {
1537
+ text: string;
1538
+ }, {
1539
+ text: string;
1540
+ }>, "many">;
1541
+ }, "strip", z.ZodTypeAny, {
1542
+ parts: {
1543
+ text: string;
1544
+ }[];
1545
+ }, {
1546
+ parts: {
1547
+ text: string;
1548
+ }[];
1549
+ }>>;
1550
+ system_instruction: z.ZodOptional<z.ZodObject<{
1551
+ parts: z.ZodArray<z.ZodObject<{
1552
+ text: z.ZodString;
1553
+ }, "strip", z.ZodTypeAny, {
1554
+ text: string;
1555
+ }, {
1556
+ text: string;
1557
+ }>, "many">;
1558
+ }, "strip", z.ZodTypeAny, {
1559
+ parts: {
1560
+ text: string;
1561
+ }[];
1562
+ }, {
1563
+ parts: {
1564
+ text: string;
1565
+ }[];
1566
+ }>>;
1567
+ generationConfig: z.ZodOptional<z.ZodObject<{
1568
+ stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1569
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
1570
+ temperature: z.ZodOptional<z.ZodNumber>;
1571
+ topP: z.ZodOptional<z.ZodNumber>;
1572
+ topK: z.ZodOptional<z.ZodNumber>;
1573
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
1574
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
1575
+ seed: z.ZodOptional<z.ZodNumber>;
1576
+ }, "strip", z.ZodTypeAny, {
1577
+ frequencyPenalty?: number | undefined;
1578
+ presencePenalty?: number | undefined;
1579
+ seed?: number | undefined;
1580
+ temperature?: number | undefined;
1581
+ maxOutputTokens?: number | undefined;
1582
+ stopSequences?: string[] | undefined;
1583
+ topP?: number | undefined;
1584
+ topK?: number | undefined;
1585
+ }, {
1586
+ frequencyPenalty?: number | undefined;
1587
+ presencePenalty?: number | undefined;
1588
+ seed?: number | undefined;
1589
+ temperature?: number | undefined;
1590
+ maxOutputTokens?: number | undefined;
1591
+ stopSequences?: string[] | undefined;
1592
+ topP?: number | undefined;
1593
+ topK?: number | undefined;
1594
+ }>>;
1595
+ generation_config: z.ZodOptional<z.ZodObject<{
1596
+ stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1597
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
1598
+ temperature: z.ZodOptional<z.ZodNumber>;
1599
+ topP: z.ZodOptional<z.ZodNumber>;
1600
+ topK: z.ZodOptional<z.ZodNumber>;
1601
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
1602
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
1603
+ seed: z.ZodOptional<z.ZodNumber>;
1604
+ }, "strip", z.ZodTypeAny, {
1605
+ frequencyPenalty?: number | undefined;
1606
+ presencePenalty?: number | undefined;
1607
+ seed?: number | undefined;
1608
+ temperature?: number | undefined;
1609
+ maxOutputTokens?: number | undefined;
1610
+ stopSequences?: string[] | undefined;
1611
+ topP?: number | undefined;
1612
+ topK?: number | undefined;
1613
+ }, {
1614
+ frequencyPenalty?: number | undefined;
1615
+ presencePenalty?: number | undefined;
1616
+ seed?: number | undefined;
1617
+ temperature?: number | undefined;
1618
+ maxOutputTokens?: number | undefined;
1619
+ stopSequences?: string[] | undefined;
1620
+ topP?: number | undefined;
1621
+ topK?: number | undefined;
1622
+ }>>;
1623
+ tools: z.ZodOptional<z.ZodObject<{
1624
+ function_declarations: z.ZodArray<z.ZodObject<{
1625
+ name: z.ZodString;
1626
+ description: z.ZodString;
1627
+ parameters: z.ZodAny;
1628
+ }, "strip", z.ZodTypeAny, {
1629
+ description: string;
1630
+ name: string;
1631
+ parameters?: any;
1632
+ }, {
1633
+ description: string;
1634
+ name: string;
1635
+ parameters?: any;
1636
+ }>, "many">;
1637
+ }, "strip", z.ZodTypeAny, {
1638
+ function_declarations: {
1639
+ description: string;
1640
+ name: string;
1641
+ parameters?: any;
1642
+ }[];
1643
+ }, {
1644
+ function_declarations: {
1645
+ description: string;
1646
+ name: string;
1647
+ parameters?: any;
1648
+ }[];
1649
+ }>>;
1650
+ toolConfig: z.ZodOptional<z.ZodObject<{
1651
+ function_calling_config: z.ZodObject<{
1652
+ mode: z.ZodEnum<["ANY", "AUTO", "NONE"]>;
1653
+ allowed_function_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1654
+ }, "strip", z.ZodTypeAny, {
1655
+ mode: "ANY" | "AUTO" | "NONE";
1656
+ allowed_function_names?: string[] | undefined;
1657
+ }, {
1658
+ mode: "ANY" | "AUTO" | "NONE";
1659
+ allowed_function_names?: string[] | undefined;
1660
+ }>;
1661
+ }, "strip", z.ZodTypeAny, {
1662
+ function_calling_config: {
1663
+ mode: "ANY" | "AUTO" | "NONE";
1664
+ allowed_function_names?: string[] | undefined;
1665
+ };
1666
+ }, {
1667
+ function_calling_config: {
1668
+ mode: "ANY" | "AUTO" | "NONE";
1669
+ allowed_function_names?: string[] | undefined;
1670
+ };
1671
+ }>>;
1672
+ tool_config: z.ZodOptional<z.ZodObject<{
1673
+ function_calling_config: z.ZodObject<{
1674
+ mode: z.ZodEnum<["ANY", "AUTO", "NONE"]>;
1675
+ allowed_function_names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1676
+ }, "strip", z.ZodTypeAny, {
1677
+ mode: "ANY" | "AUTO" | "NONE";
1678
+ allowed_function_names?: string[] | undefined;
1679
+ }, {
1680
+ mode: "ANY" | "AUTO" | "NONE";
1681
+ allowed_function_names?: string[] | undefined;
1682
+ }>;
1683
+ }, "strip", z.ZodTypeAny, {
1684
+ function_calling_config: {
1685
+ mode: "ANY" | "AUTO" | "NONE";
1686
+ allowed_function_names?: string[] | undefined;
1687
+ };
1688
+ }, {
1689
+ function_calling_config: {
1690
+ mode: "ANY" | "AUTO" | "NONE";
1691
+ allowed_function_names?: string[] | undefined;
1692
+ };
1693
+ }>>;
1694
+ }, "strip", z.ZodTypeAny, {
1695
+ contents: {
1696
+ role: "function" | "user" | "model";
1697
+ parts: ({
1698
+ text: string;
1699
+ } | {
1700
+ inline_data: {
1701
+ mime_type: string;
1702
+ data: string;
1703
+ };
1704
+ } | {
1705
+ function_call: {
1706
+ name: string;
1707
+ args: Record<string, string>;
1708
+ };
1709
+ } | {
1710
+ function_response: {
1711
+ name: string;
1712
+ response: Record<string, string>;
1713
+ };
1714
+ })[];
1715
+ }[];
1716
+ model?: string | undefined;
1717
+ systemInstruction?: {
1718
+ parts: {
1719
+ text: string;
1720
+ }[];
1721
+ } | undefined;
1722
+ system_instruction?: {
1723
+ parts: {
1724
+ text: string;
1725
+ }[];
1726
+ } | undefined;
1727
+ generationConfig?: {
1728
+ frequencyPenalty?: number | undefined;
1729
+ presencePenalty?: number | undefined;
1730
+ seed?: number | undefined;
1731
+ temperature?: number | undefined;
1732
+ maxOutputTokens?: number | undefined;
1733
+ stopSequences?: string[] | undefined;
1734
+ topP?: number | undefined;
1735
+ topK?: number | undefined;
1736
+ } | undefined;
1737
+ generation_config?: {
1738
+ frequencyPenalty?: number | undefined;
1739
+ presencePenalty?: number | undefined;
1740
+ seed?: number | undefined;
1741
+ temperature?: number | undefined;
1742
+ maxOutputTokens?: number | undefined;
1743
+ stopSequences?: string[] | undefined;
1744
+ topP?: number | undefined;
1745
+ topK?: number | undefined;
1746
+ } | undefined;
1747
+ tools?: {
1748
+ function_declarations: {
1749
+ description: string;
1750
+ name: string;
1751
+ parameters?: any;
1752
+ }[];
1753
+ } | undefined;
1754
+ toolConfig?: {
1755
+ function_calling_config: {
1756
+ mode: "ANY" | "AUTO" | "NONE";
1757
+ allowed_function_names?: string[] | undefined;
1758
+ };
1759
+ } | undefined;
1760
+ tool_config?: {
1761
+ function_calling_config: {
1762
+ mode: "ANY" | "AUTO" | "NONE";
1763
+ allowed_function_names?: string[] | undefined;
1764
+ };
1765
+ } | undefined;
1766
+ }, {
1767
+ contents: {
1768
+ role: "function" | "user" | "model";
1769
+ parts: ({
1770
+ text: string;
1771
+ } | {
1772
+ inline_data: {
1773
+ mime_type: string;
1774
+ data: string;
1775
+ };
1776
+ } | {
1777
+ function_call: {
1778
+ name: string;
1779
+ args: Record<string, string>;
1780
+ };
1781
+ } | {
1782
+ function_response: {
1783
+ name: string;
1784
+ response: Record<string, string>;
1785
+ };
1786
+ })[];
1787
+ }[];
1788
+ model?: string | undefined;
1789
+ systemInstruction?: {
1790
+ parts: {
1791
+ text: string;
1792
+ }[];
1793
+ } | undefined;
1794
+ system_instruction?: {
1795
+ parts: {
1796
+ text: string;
1797
+ }[];
1798
+ } | undefined;
1799
+ generationConfig?: {
1800
+ frequencyPenalty?: number | undefined;
1801
+ presencePenalty?: number | undefined;
1802
+ seed?: number | undefined;
1803
+ temperature?: number | undefined;
1804
+ maxOutputTokens?: number | undefined;
1805
+ stopSequences?: string[] | undefined;
1806
+ topP?: number | undefined;
1807
+ topK?: number | undefined;
1808
+ } | undefined;
1809
+ generation_config?: {
1810
+ frequencyPenalty?: number | undefined;
1811
+ presencePenalty?: number | undefined;
1812
+ seed?: number | undefined;
1813
+ temperature?: number | undefined;
1814
+ maxOutputTokens?: number | undefined;
1815
+ stopSequences?: string[] | undefined;
1816
+ topP?: number | undefined;
1817
+ topK?: number | undefined;
1818
+ } | undefined;
1819
+ tools?: {
1820
+ function_declarations: {
1821
+ description: string;
1822
+ name: string;
1823
+ parameters?: any;
1824
+ }[];
1825
+ } | undefined;
1826
+ toolConfig?: {
1827
+ function_calling_config: {
1828
+ mode: "ANY" | "AUTO" | "NONE";
1829
+ allowed_function_names?: string[] | undefined;
1830
+ };
1831
+ } | undefined;
1832
+ tool_config?: {
1833
+ function_calling_config: {
1834
+ mode: "ANY" | "AUTO" | "NONE";
1835
+ allowed_function_names?: string[] | undefined;
1836
+ };
1837
+ } | undefined;
1838
+ }>;
1839
+ type GoogleChatRequestType = z.infer<typeof GoogleChatRequest>;
1840
+
1841
+ declare const BaseChatModelOptions: z.ZodObject<{
1842
+ apiKey: z.ZodString;
1843
+ baseUrl: z.ZodOptional<z.ZodString>;
1844
+ completeChatUrl: z.ZodOptional<z.ZodString>;
1845
+ streamChatUrl: z.ZodOptional<z.ZodString>;
1846
+ }, "strip", z.ZodTypeAny, {
1847
+ apiKey: string;
1848
+ baseUrl?: string | undefined;
1849
+ completeChatUrl?: string | undefined;
1850
+ streamChatUrl?: string | undefined;
1851
+ }, {
1852
+ apiKey: string;
1853
+ baseUrl?: string | undefined;
1854
+ completeChatUrl?: string | undefined;
1855
+ streamChatUrl?: string | undefined;
1856
+ }>;
1857
+ type BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;
1858
+ declare class BaseChatModel implements ChatModelV1<ChatModelSchemaType> {
1859
+ readonly version: "v1";
1860
+ modelSchema: ChatModelSchemaType;
1861
+ private readonly apiKey;
1862
+ private readonly baseUrl;
1863
+ private readonly streamChatUrl;
1864
+ private readonly completeChatUrl;
1865
+ constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
1866
+ getDefaultBaseUrl(): UrlType;
1867
+ getDefaultHeaders(): HeadersType;
1868
+ getDefaultParams(): ParamsType;
1869
+ getRetryDelay(responseHeaders: HeadersType): {
1870
+ shouldRetry: boolean;
1871
+ delayMs: number;
1872
+ };
1873
+ getTokenCount(messages: MessageType[]): number;
1874
+ transformModelRequest(request: GoogleChatRequestType): {
1875
+ modelName: string | undefined;
1876
+ config: ConfigType;
1877
+ messages: MessageType[];
1878
+ tools: ToolType[] | undefined;
1879
+ };
1880
+ transformConfig(config: ConfigType, messages?: MessageType[], tools?: ToolType[]): ParamsType;
1881
+ transformMessages(messages: MessageType[]): ParamsType;
1882
+ transformTools(tools: ToolType[]): ParamsType;
1883
+ getCompleteChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
1884
+ getCompleteChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
1885
+ getCompleteChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
1886
+ transformCompleteChatResponse(response: any): ChatResponseType;
1887
+ getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
1888
+ getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
1889
+ getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
1890
+ transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
1891
+ partialResponse: PartialChatResponseType;
1892
+ buffer: string;
1893
+ }>;
1894
+ }
1895
+
1896
+ declare class BaseChatModelGemini1 extends BaseChatModel {
1897
+ transformMessages(messages: MessageType[]): ParamsType;
1898
+ }
1899
+
1900
+ declare const Gemini1_0ProLiteral = "gemini-1.0-pro";
1901
+ declare const Gemini1_0ProSchema: {
1902
+ description: string;
1903
+ maxOutputTokens: number;
1904
+ name: string;
1905
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
1906
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
1907
+ maxInputTokens: number;
1908
+ config: {
1909
+ def: Record<string, {
1910
+ type: "multi-string";
1911
+ param: string;
1912
+ title: string;
1913
+ description: string;
1914
+ max: number;
1915
+ } | {
1916
+ type: "range";
1917
+ param: string;
1918
+ title: string;
1919
+ description: string;
1920
+ max: number;
1921
+ min: number;
1922
+ step: number;
1923
+ default: number;
1924
+ } | {
1925
+ type: "select-string";
1926
+ param: string;
1927
+ title: string;
1928
+ description: string;
1929
+ default: string | null;
1930
+ choices: string[];
1931
+ } | {
1932
+ type: "object-schema";
1933
+ param: string;
1934
+ title: string;
1935
+ description: string;
1936
+ objectSchema?: any;
1937
+ } | {
1938
+ type: "select-boolean";
1939
+ param: string;
1940
+ title: string;
1941
+ description: string;
1942
+ default: boolean | null;
1943
+ }>;
1944
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1945
+ };
1946
+ };
1947
+ declare const Gemini1_0ProOptions: z.ZodObject<{
1948
+ apiKey: z.ZodString;
1949
+ baseUrl: z.ZodOptional<z.ZodString>;
1950
+ completeChatUrl: z.ZodOptional<z.ZodString>;
1951
+ streamChatUrl: z.ZodOptional<z.ZodString>;
1952
+ }, "strip", z.ZodTypeAny, {
1953
+ apiKey: string;
1954
+ baseUrl?: string | undefined;
1955
+ completeChatUrl?: string | undefined;
1956
+ streamChatUrl?: string | undefined;
1957
+ }, {
1958
+ apiKey: string;
1959
+ baseUrl?: string | undefined;
1960
+ completeChatUrl?: string | undefined;
1961
+ streamChatUrl?: string | undefined;
1962
+ }>;
1963
+ type Gemini1_0ProOptionsType = z.infer<typeof Gemini1_0ProOptions>;
1964
+ declare class Gemini1_0Pro extends BaseChatModelGemini1 {
1965
+ constructor(options: Gemini1_0ProOptionsType);
1966
+ }
1967
+
1968
+ declare const Gemini1_0Pro_001Literal = "gemini-1.0-pro-001";
1969
+ declare const Gemini1_0Pro_001Schema: {
1970
+ description: string;
1971
+ maxOutputTokens: number;
1972
+ name: string;
1973
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
1974
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
1975
+ maxInputTokens: number;
1976
+ config: {
1977
+ def: Record<string, {
1978
+ type: "multi-string";
1979
+ param: string;
1980
+ title: string;
1981
+ description: string;
1982
+ max: number;
1983
+ } | {
1984
+ type: "range";
1985
+ param: string;
1986
+ title: string;
1987
+ description: string;
1988
+ max: number;
1989
+ min: number;
1990
+ step: number;
1991
+ default: number;
1992
+ } | {
1993
+ type: "select-string";
1994
+ param: string;
1995
+ title: string;
1996
+ description: string;
1997
+ default: string | null;
1998
+ choices: string[];
1999
+ } | {
2000
+ type: "object-schema";
2001
+ param: string;
2002
+ title: string;
2003
+ description: string;
2004
+ objectSchema?: any;
2005
+ } | {
2006
+ type: "select-boolean";
2007
+ param: string;
2008
+ title: string;
2009
+ description: string;
2010
+ default: boolean | null;
2011
+ }>;
2012
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2013
+ };
2014
+ };
2015
+ declare const Gemini1_0Pro_001Options: z.ZodObject<{
2016
+ apiKey: z.ZodString;
2017
+ baseUrl: z.ZodOptional<z.ZodString>;
2018
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2019
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2020
+ }, "strip", z.ZodTypeAny, {
2021
+ apiKey: string;
2022
+ baseUrl?: string | undefined;
2023
+ completeChatUrl?: string | undefined;
2024
+ streamChatUrl?: string | undefined;
2025
+ }, {
2026
+ apiKey: string;
2027
+ baseUrl?: string | undefined;
2028
+ completeChatUrl?: string | undefined;
2029
+ streamChatUrl?: string | undefined;
2030
+ }>;
2031
+ type Gemini1_0Pro_001OptionsType = z.infer<typeof Gemini1_0Pro_001Options>;
2032
+ declare class Gemini1_0Pro_001 extends BaseChatModelGemini1 {
2033
+ constructor(options: Gemini1_0Pro_001OptionsType);
2034
+ }
2035
+
2036
+ declare const Gemini1_0ProLatestLiteral = "gemini-1.0-pro-latest";
2037
+ declare const Gemini1_0ProLatestSchema: {
2038
+ description: string;
2039
+ maxOutputTokens: number;
2040
+ name: string;
2041
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2042
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
2043
+ maxInputTokens: number;
2044
+ config: {
2045
+ def: Record<string, {
2046
+ type: "multi-string";
2047
+ param: string;
2048
+ title: string;
2049
+ description: string;
2050
+ max: number;
2051
+ } | {
2052
+ type: "range";
2053
+ param: string;
2054
+ title: string;
2055
+ description: string;
2056
+ max: number;
2057
+ min: number;
2058
+ step: number;
2059
+ default: number;
2060
+ } | {
2061
+ type: "select-string";
2062
+ param: string;
2063
+ title: string;
2064
+ description: string;
2065
+ default: string | null;
2066
+ choices: string[];
2067
+ } | {
2068
+ type: "object-schema";
2069
+ param: string;
2070
+ title: string;
2071
+ description: string;
2072
+ objectSchema?: any;
2073
+ } | {
2074
+ type: "select-boolean";
2075
+ param: string;
2076
+ title: string;
2077
+ description: string;
2078
+ default: boolean | null;
2079
+ }>;
2080
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2081
+ };
2082
+ };
2083
+ declare const Gemini1_0ProLatestOptions: z.ZodObject<{
2084
+ apiKey: z.ZodString;
2085
+ baseUrl: z.ZodOptional<z.ZodString>;
2086
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2087
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2088
+ }, "strip", z.ZodTypeAny, {
2089
+ apiKey: string;
2090
+ baseUrl?: string | undefined;
2091
+ completeChatUrl?: string | undefined;
2092
+ streamChatUrl?: string | undefined;
2093
+ }, {
2094
+ apiKey: string;
2095
+ baseUrl?: string | undefined;
2096
+ completeChatUrl?: string | undefined;
2097
+ streamChatUrl?: string | undefined;
2098
+ }>;
2099
+ type Gemini1_0ProLatestOptionsType = z.infer<typeof Gemini1_0ProLatestOptions>;
2100
+ declare class Gemini1_0ProLatest extends BaseChatModelGemini1 {
2101
+ constructor(options: Gemini1_0ProLatestOptionsType);
2102
+ }
2103
+
2104
+ declare const Gemini1_0ProVisionLiteral = "gemini-1.0-pro-vision";
2105
+ declare const Gemini1_0ProVisionSchema: {
2106
+ description: string;
2107
+ maxOutputTokens: number;
2108
+ name: string;
2109
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2110
+ modalities: ["text" | "image", ...("text" | "image")[]];
2111
+ maxInputTokens: number;
2112
+ config: {
2113
+ def: Record<string, {
2114
+ type: "multi-string";
2115
+ param: string;
2116
+ title: string;
2117
+ description: string;
2118
+ max: number;
2119
+ } | {
2120
+ type: "range";
2121
+ param: string;
2122
+ title: string;
2123
+ description: string;
2124
+ max: number;
2125
+ min: number;
2126
+ step: number;
2127
+ default: number;
2128
+ } | {
2129
+ type: "select-string";
2130
+ param: string;
2131
+ title: string;
2132
+ description: string;
2133
+ default: string | null;
2134
+ choices: string[];
2135
+ } | {
2136
+ type: "object-schema";
2137
+ param: string;
2138
+ title: string;
2139
+ description: string;
2140
+ objectSchema?: any;
2141
+ } | {
2142
+ type: "select-boolean";
2143
+ param: string;
2144
+ title: string;
2145
+ description: string;
2146
+ default: boolean | null;
2147
+ }>;
2148
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2149
+ };
2150
+ };
2151
+ declare const Gemini1_0ProVisionOptions: z.ZodObject<{
2152
+ apiKey: z.ZodString;
2153
+ baseUrl: z.ZodOptional<z.ZodString>;
2154
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2155
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2156
+ }, "strip", z.ZodTypeAny, {
2157
+ apiKey: string;
2158
+ baseUrl?: string | undefined;
2159
+ completeChatUrl?: string | undefined;
2160
+ streamChatUrl?: string | undefined;
2161
+ }, {
2162
+ apiKey: string;
2163
+ baseUrl?: string | undefined;
2164
+ completeChatUrl?: string | undefined;
2165
+ streamChatUrl?: string | undefined;
2166
+ }>;
2167
+ type Gemini1_0ProVisionOptionsType = z.infer<typeof Gemini1_0ProVisionOptions>;
2168
+ declare class Gemini1_0ProVision extends BaseChatModelGemini1 {
2169
+ constructor(options: Gemini1_0ProVisionOptionsType);
2170
+ }
2171
+
2172
+ declare const Gemini1_5FlashLiteral = "gemini-1.5-flash";
2173
+ declare const Gemini1_5FlashSchema: {
2174
+ description: string;
2175
+ maxOutputTokens: number;
2176
+ name: string;
2177
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2178
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
2179
+ maxInputTokens: number;
2180
+ config: {
2181
+ def: Record<string, {
2182
+ type: "multi-string";
2183
+ param: string;
2184
+ title: string;
2185
+ description: string;
2186
+ max: number;
2187
+ } | {
2188
+ type: "range";
2189
+ param: string;
2190
+ title: string;
2191
+ description: string;
2192
+ max: number;
2193
+ min: number;
2194
+ step: number;
2195
+ default: number;
2196
+ } | {
2197
+ type: "select-string";
2198
+ param: string;
2199
+ title: string;
2200
+ description: string;
2201
+ default: string | null;
2202
+ choices: string[];
2203
+ } | {
2204
+ type: "object-schema";
2205
+ param: string;
2206
+ title: string;
2207
+ description: string;
2208
+ objectSchema?: any;
2209
+ } | {
2210
+ type: "select-boolean";
2211
+ param: string;
2212
+ title: string;
2213
+ description: string;
2214
+ default: boolean | null;
2215
+ }>;
2216
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2217
+ };
2218
+ };
2219
+ declare const Gemini1_5FlashOptions: z.ZodObject<{
2220
+ apiKey: z.ZodString;
2221
+ baseUrl: z.ZodOptional<z.ZodString>;
2222
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2223
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2224
+ }, "strip", z.ZodTypeAny, {
2225
+ apiKey: string;
2226
+ baseUrl?: string | undefined;
2227
+ completeChatUrl?: string | undefined;
2228
+ streamChatUrl?: string | undefined;
2229
+ }, {
2230
+ apiKey: string;
2231
+ baseUrl?: string | undefined;
2232
+ completeChatUrl?: string | undefined;
2233
+ streamChatUrl?: string | undefined;
2234
+ }>;
2235
+ type Gemini1_5FlashOptionsType = z.infer<typeof Gemini1_5FlashOptions>;
2236
+ declare class Gemini1_5Flash extends BaseChatModel {
2237
+ constructor(options: Gemini1_5FlashOptionsType);
2238
+ }
2239
+
2240
+ declare const Gemini1_5Flash001Literal = "gemini-1.5-flash-001";
2241
+ declare const Gemini1_5Flash001Schema: {
2242
+ description: string;
2243
+ maxOutputTokens: number;
2244
+ name: string;
2245
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2246
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
2247
+ maxInputTokens: number;
2248
+ config: {
2249
+ def: Record<string, {
2250
+ type: "multi-string";
2251
+ param: string;
2252
+ title: string;
2253
+ description: string;
2254
+ max: number;
2255
+ } | {
2256
+ type: "range";
2257
+ param: string;
2258
+ title: string;
2259
+ description: string;
2260
+ max: number;
2261
+ min: number;
2262
+ step: number;
2263
+ default: number;
2264
+ } | {
2265
+ type: "select-string";
2266
+ param: string;
2267
+ title: string;
2268
+ description: string;
2269
+ default: string | null;
2270
+ choices: string[];
2271
+ } | {
2272
+ type: "object-schema";
2273
+ param: string;
2274
+ title: string;
2275
+ description: string;
2276
+ objectSchema?: any;
2277
+ } | {
2278
+ type: "select-boolean";
2279
+ param: string;
2280
+ title: string;
2281
+ description: string;
2282
+ default: boolean | null;
2283
+ }>;
2284
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2285
+ };
2286
+ };
2287
+ declare const Gemini1_5Flash001Options: z.ZodObject<{
2288
+ apiKey: z.ZodString;
2289
+ baseUrl: z.ZodOptional<z.ZodString>;
2290
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2291
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2292
+ }, "strip", z.ZodTypeAny, {
2293
+ apiKey: string;
2294
+ baseUrl?: string | undefined;
2295
+ completeChatUrl?: string | undefined;
2296
+ streamChatUrl?: string | undefined;
2297
+ }, {
2298
+ apiKey: string;
2299
+ baseUrl?: string | undefined;
2300
+ completeChatUrl?: string | undefined;
2301
+ streamChatUrl?: string | undefined;
2302
+ }>;
2303
+ type Gemini1_5Flash001OptionsType = z.infer<typeof Gemini1_5Flash001Options>;
2304
+ declare class Gemini1_5Flash001 extends BaseChatModel {
2305
+ constructor(options: Gemini1_5Flash001OptionsType);
2306
+ }
2307
+
2308
+ declare const Gemini1_5Flash002Literal = "gemini-1.5-flash-002";
2309
+ declare const Gemini1_5Flash002Schema: {
2310
+ description: string;
2311
+ maxOutputTokens: number;
2312
+ name: string;
2313
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2314
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
2315
+ maxInputTokens: number;
2316
+ config: {
2317
+ def: Record<string, {
2318
+ type: "multi-string";
2319
+ param: string;
2320
+ title: string;
2321
+ description: string;
2322
+ max: number;
2323
+ } | {
2324
+ type: "range";
2325
+ param: string;
2326
+ title: string;
2327
+ description: string;
2328
+ max: number;
2329
+ min: number;
2330
+ step: number;
2331
+ default: number;
2332
+ } | {
2333
+ type: "select-string";
2334
+ param: string;
2335
+ title: string;
2336
+ description: string;
2337
+ default: string | null;
2338
+ choices: string[];
2339
+ } | {
2340
+ type: "object-schema";
2341
+ param: string;
2342
+ title: string;
2343
+ description: string;
2344
+ objectSchema?: any;
2345
+ } | {
2346
+ type: "select-boolean";
2347
+ param: string;
2348
+ title: string;
2349
+ description: string;
2350
+ default: boolean | null;
2351
+ }>;
2352
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2353
+ };
2354
+ };
2355
+ declare const Gemini1_5Flash002Options: z.ZodObject<{
2356
+ apiKey: z.ZodString;
2357
+ baseUrl: z.ZodOptional<z.ZodString>;
2358
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2359
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2360
+ }, "strip", z.ZodTypeAny, {
2361
+ apiKey: string;
2362
+ baseUrl?: string | undefined;
2363
+ completeChatUrl?: string | undefined;
2364
+ streamChatUrl?: string | undefined;
2365
+ }, {
2366
+ apiKey: string;
2367
+ baseUrl?: string | undefined;
2368
+ completeChatUrl?: string | undefined;
2369
+ streamChatUrl?: string | undefined;
2370
+ }>;
2371
+ type Gemini1_5Flash002OptionsType = z.infer<typeof Gemini1_5Flash002Options>;
2372
+ declare class Gemini1_5Flash002 extends BaseChatModel {
2373
+ constructor(options: Gemini1_5Flash002OptionsType);
2374
+ }
2375
+
2376
+ declare const Gemini1_5FlashLatestLiteral = "gemini-1.5-flash-latest";
2377
+ declare const Gemini1_5FlashLatestSchema: {
2378
+ description: string;
2379
+ maxOutputTokens: number;
2380
+ name: string;
2381
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2382
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
2383
+ maxInputTokens: number;
2384
+ config: {
2385
+ def: Record<string, {
2386
+ type: "multi-string";
2387
+ param: string;
2388
+ title: string;
2389
+ description: string;
2390
+ max: number;
2391
+ } | {
2392
+ type: "range";
2393
+ param: string;
2394
+ title: string;
2395
+ description: string;
2396
+ max: number;
2397
+ min: number;
2398
+ step: number;
2399
+ default: number;
2400
+ } | {
2401
+ type: "select-string";
2402
+ param: string;
2403
+ title: string;
2404
+ description: string;
2405
+ default: string | null;
2406
+ choices: string[];
2407
+ } | {
2408
+ type: "object-schema";
2409
+ param: string;
2410
+ title: string;
2411
+ description: string;
2412
+ objectSchema?: any;
2413
+ } | {
2414
+ type: "select-boolean";
2415
+ param: string;
2416
+ title: string;
2417
+ description: string;
2418
+ default: boolean | null;
2419
+ }>;
2420
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2421
+ };
2422
+ };
2423
+ declare const Gemini1_5FlashLatestOptions: z.ZodObject<{
2424
+ apiKey: z.ZodString;
2425
+ baseUrl: z.ZodOptional<z.ZodString>;
2426
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2427
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2428
+ }, "strip", z.ZodTypeAny, {
2429
+ apiKey: string;
2430
+ baseUrl?: string | undefined;
2431
+ completeChatUrl?: string | undefined;
2432
+ streamChatUrl?: string | undefined;
2433
+ }, {
2434
+ apiKey: string;
2435
+ baseUrl?: string | undefined;
2436
+ completeChatUrl?: string | undefined;
2437
+ streamChatUrl?: string | undefined;
2438
+ }>;
2439
+ type Gemini1_5FlashLatestOptionsType = z.infer<typeof Gemini1_5FlashLatestOptions>;
2440
+ declare class Gemini1_5FlashLatest extends BaseChatModel {
2441
+ constructor(options: Gemini1_5FlashLatestOptionsType);
2442
+ }
2443
+
2444
+ declare const Gemini1_5ProLiteral = "gemini-1.5-pro";
2445
+ declare const Gemini1_5ProSchema: {
2446
+ description: string;
2447
+ maxOutputTokens: number;
2448
+ name: string;
2449
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2450
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
2451
+ maxInputTokens: number;
2452
+ config: {
2453
+ def: Record<string, {
2454
+ type: "multi-string";
2455
+ param: string;
2456
+ title: string;
2457
+ description: string;
2458
+ max: number;
2459
+ } | {
2460
+ type: "range";
2461
+ param: string;
2462
+ title: string;
2463
+ description: string;
2464
+ max: number;
2465
+ min: number;
2466
+ step: number;
2467
+ default: number;
2468
+ } | {
2469
+ type: "select-string";
2470
+ param: string;
2471
+ title: string;
2472
+ description: string;
2473
+ default: string | null;
2474
+ choices: string[];
2475
+ } | {
2476
+ type: "object-schema";
2477
+ param: string;
2478
+ title: string;
2479
+ description: string;
2480
+ objectSchema?: any;
2481
+ } | {
2482
+ type: "select-boolean";
2483
+ param: string;
2484
+ title: string;
2485
+ description: string;
2486
+ default: boolean | null;
2487
+ }>;
2488
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2489
+ };
2490
+ };
2491
+ declare const Gemini1_5ProOptions: z.ZodObject<{
2492
+ apiKey: z.ZodString;
2493
+ baseUrl: z.ZodOptional<z.ZodString>;
2494
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2495
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2496
+ }, "strip", z.ZodTypeAny, {
2497
+ apiKey: string;
2498
+ baseUrl?: string | undefined;
2499
+ completeChatUrl?: string | undefined;
2500
+ streamChatUrl?: string | undefined;
2501
+ }, {
2502
+ apiKey: string;
2503
+ baseUrl?: string | undefined;
2504
+ completeChatUrl?: string | undefined;
2505
+ streamChatUrl?: string | undefined;
2506
+ }>;
2507
+ type Gemini1_5ProOptionsType = z.infer<typeof Gemini1_5ProOptions>;
2508
+ declare class Gemini1_5Pro extends BaseChatModel {
2509
+ constructor(options: Gemini1_5ProOptionsType);
2510
+ }
2511
+
2512
+ declare const Gemini1_5Pro001Literal = "gemini-1.5-pro-001";
2513
+ declare const Gemini1_5Pro001Schema: {
2514
+ description: string;
2515
+ maxOutputTokens: number;
2516
+ name: string;
2517
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2518
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
2519
+ maxInputTokens: number;
2520
+ config: {
2521
+ def: Record<string, {
2522
+ type: "multi-string";
2523
+ param: string;
2524
+ title: string;
2525
+ description: string;
2526
+ max: number;
2527
+ } | {
2528
+ type: "range";
2529
+ param: string;
2530
+ title: string;
2531
+ description: string;
2532
+ max: number;
2533
+ min: number;
2534
+ step: number;
2535
+ default: number;
2536
+ } | {
2537
+ type: "select-string";
2538
+ param: string;
2539
+ title: string;
2540
+ description: string;
2541
+ default: string | null;
2542
+ choices: string[];
2543
+ } | {
2544
+ type: "object-schema";
2545
+ param: string;
2546
+ title: string;
2547
+ description: string;
2548
+ objectSchema?: any;
2549
+ } | {
2550
+ type: "select-boolean";
2551
+ param: string;
2552
+ title: string;
2553
+ description: string;
2554
+ default: boolean | null;
2555
+ }>;
2556
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2557
+ };
2558
+ };
2559
+ declare const Gemini1_5Pro001Options: z.ZodObject<{
2560
+ apiKey: z.ZodString;
2561
+ baseUrl: z.ZodOptional<z.ZodString>;
2562
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2563
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2564
+ }, "strip", z.ZodTypeAny, {
2565
+ apiKey: string;
2566
+ baseUrl?: string | undefined;
2567
+ completeChatUrl?: string | undefined;
2568
+ streamChatUrl?: string | undefined;
2569
+ }, {
2570
+ apiKey: string;
2571
+ baseUrl?: string | undefined;
2572
+ completeChatUrl?: string | undefined;
2573
+ streamChatUrl?: string | undefined;
2574
+ }>;
2575
+ type Gemini1_5Pro001OptionsType = z.infer<typeof Gemini1_5Pro001Options>;
2576
+ declare class Gemini1_5Pro001 extends BaseChatModel {
2577
+ constructor(options: Gemini1_5Pro001OptionsType);
2578
+ }
2579
+
2580
+ declare const Gemini1_5Pro002Literal = "gemini-1.5-pro-002";
2581
+ declare const Gemini1_5Pro002Schema: {
2582
+ description: string;
2583
+ maxOutputTokens: number;
2584
+ name: string;
2585
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2586
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
2587
+ maxInputTokens: number;
2588
+ config: {
2589
+ def: Record<string, {
2590
+ type: "multi-string";
2591
+ param: string;
2592
+ title: string;
2593
+ description: string;
2594
+ max: number;
2595
+ } | {
2596
+ type: "range";
2597
+ param: string;
2598
+ title: string;
2599
+ description: string;
2600
+ max: number;
2601
+ min: number;
2602
+ step: number;
2603
+ default: number;
2604
+ } | {
2605
+ type: "select-string";
2606
+ param: string;
2607
+ title: string;
2608
+ description: string;
2609
+ default: string | null;
2610
+ choices: string[];
2611
+ } | {
2612
+ type: "object-schema";
2613
+ param: string;
2614
+ title: string;
2615
+ description: string;
2616
+ objectSchema?: any;
2617
+ } | {
2618
+ type: "select-boolean";
2619
+ param: string;
2620
+ title: string;
2621
+ description: string;
2622
+ default: boolean | null;
2623
+ }>;
2624
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2625
+ };
2626
+ };
2627
+ declare const Gemini1_5Pro002Options: z.ZodObject<{
2628
+ apiKey: z.ZodString;
2629
+ baseUrl: z.ZodOptional<z.ZodString>;
2630
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2631
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2632
+ }, "strip", z.ZodTypeAny, {
2633
+ apiKey: string;
2634
+ baseUrl?: string | undefined;
2635
+ completeChatUrl?: string | undefined;
2636
+ streamChatUrl?: string | undefined;
2637
+ }, {
2638
+ apiKey: string;
2639
+ baseUrl?: string | undefined;
2640
+ completeChatUrl?: string | undefined;
2641
+ streamChatUrl?: string | undefined;
2642
+ }>;
2643
+ type Gemini1_5Pro002OptionsType = z.infer<typeof Gemini1_5Pro002Options>;
2644
+ declare class Gemini1_5Pro002 extends BaseChatModel {
2645
+ constructor(options: Gemini1_5Pro002OptionsType);
2646
+ }
2647
+
2648
+ declare const Gemini1_5ProLatestLiteral = "gemini-1.5-pro-latest";
2649
+ declare const Gemini1_5ProLatestSchema: {
2650
+ description: string;
2651
+ maxOutputTokens: number;
2652
+ name: string;
2653
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2654
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
2655
+ maxInputTokens: number;
2656
+ config: {
2657
+ def: Record<string, {
2658
+ type: "multi-string";
2659
+ param: string;
2660
+ title: string;
2661
+ description: string;
2662
+ max: number;
2663
+ } | {
2664
+ type: "range";
2665
+ param: string;
2666
+ title: string;
2667
+ description: string;
2668
+ max: number;
2669
+ min: number;
2670
+ step: number;
2671
+ default: number;
2672
+ } | {
2673
+ type: "select-string";
2674
+ param: string;
2675
+ title: string;
2676
+ description: string;
2677
+ default: string | null;
2678
+ choices: string[];
2679
+ } | {
2680
+ type: "object-schema";
2681
+ param: string;
2682
+ title: string;
2683
+ description: string;
2684
+ objectSchema?: any;
2685
+ } | {
2686
+ type: "select-boolean";
2687
+ param: string;
2688
+ title: string;
2689
+ description: string;
2690
+ default: boolean | null;
2691
+ }>;
2692
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2693
+ };
2694
+ };
2695
+ declare const Gemini1_5ProLatestOptions: z.ZodObject<{
2696
+ apiKey: z.ZodString;
2697
+ baseUrl: z.ZodOptional<z.ZodString>;
2698
+ completeChatUrl: z.ZodOptional<z.ZodString>;
2699
+ streamChatUrl: z.ZodOptional<z.ZodString>;
2700
+ }, "strip", z.ZodTypeAny, {
2701
+ apiKey: string;
2702
+ baseUrl?: string | undefined;
2703
+ completeChatUrl?: string | undefined;
2704
+ streamChatUrl?: string | undefined;
2705
+ }, {
2706
+ apiKey: string;
2707
+ baseUrl?: string | undefined;
2708
+ completeChatUrl?: string | undefined;
2709
+ streamChatUrl?: string | undefined;
2710
+ }>;
2711
+ type Gemini1_5ProLatestOptionsType = z.infer<typeof Gemini1_5ProLatestOptions>;
2712
+ declare class Gemini1_5ProLatest extends BaseChatModel {
2713
+ constructor(options: Gemini1_5ProLatestOptionsType);
2714
+ }
2715
+
2716
+ declare const GoogleEmbeddingModelModalities: EmbeddingModelSchemaType["modalities"];
2717
+ declare const GoogleEmbeddingModelModalitiesEnum: z.ZodEnum<["text"]>;
2718
+
2719
+ declare const GoogleGetEmbeddingsResponse: z.ZodObject<{
2720
+ embeddings: z.ZodArray<z.ZodObject<{
2721
+ values: z.ZodArray<z.ZodNumber, "many">;
2722
+ }, "strip", z.ZodTypeAny, {
2723
+ values: number[];
2724
+ }, {
2725
+ values: number[];
2726
+ }>, "many">;
2727
+ }, "strip", z.ZodTypeAny, {
2728
+ embeddings: {
2729
+ values: number[];
2730
+ }[];
2731
+ }, {
2732
+ embeddings: {
2733
+ values: number[];
2734
+ }[];
2735
+ }>;
2736
+ type GoogleGetEmbeddingsResponseType = z.infer<typeof GoogleGetEmbeddingsResponse>;
2737
+
2738
+ declare const GoogleEmbeddingRequestInput: z.ZodObject<{
2739
+ model: z.ZodString;
2740
+ content: z.ZodObject<{
2741
+ parts: z.ZodArray<z.ZodObject<{
2742
+ text: z.ZodString;
2743
+ }, "strip", z.ZodTypeAny, {
2744
+ text: string;
2745
+ }, {
2746
+ text: string;
2747
+ }>, "many">;
2748
+ }, "strip", z.ZodTypeAny, {
2749
+ parts: {
2750
+ text: string;
2751
+ }[];
2752
+ }, {
2753
+ parts: {
2754
+ text: string;
2755
+ }[];
2756
+ }>;
2757
+ }, "strip", z.ZodTypeAny, {
2758
+ model: string;
2759
+ content: {
2760
+ parts: {
2761
+ text: string;
2762
+ }[];
2763
+ };
2764
+ }, {
2765
+ model: string;
2766
+ content: {
2767
+ parts: {
2768
+ text: string;
2769
+ }[];
2770
+ };
2771
+ }>;
2772
+ type GoogleEmbeddingRequestInputType = z.infer<typeof GoogleEmbeddingRequestInput>;
2773
+ declare const GoogleEmbeddingRequest: z.ZodObject<{
2774
+ model: z.ZodOptional<z.ZodString>;
2775
+ requests: z.ZodArray<z.ZodObject<{
2776
+ model: z.ZodString;
2777
+ content: z.ZodObject<{
2778
+ parts: z.ZodArray<z.ZodObject<{
2779
+ text: z.ZodString;
2780
+ }, "strip", z.ZodTypeAny, {
2781
+ text: string;
2782
+ }, {
2783
+ text: string;
2784
+ }>, "many">;
2785
+ }, "strip", z.ZodTypeAny, {
2786
+ parts: {
2787
+ text: string;
2788
+ }[];
2789
+ }, {
2790
+ parts: {
2791
+ text: string;
2792
+ }[];
2793
+ }>;
2794
+ }, "strip", z.ZodTypeAny, {
2795
+ model: string;
2796
+ content: {
2797
+ parts: {
2798
+ text: string;
2799
+ }[];
2800
+ };
2801
+ }, {
2802
+ model: string;
2803
+ content: {
2804
+ parts: {
2805
+ text: string;
2806
+ }[];
2807
+ };
2808
+ }>, "many">;
2809
+ outputDimensionality: z.ZodOptional<z.ZodNumber>;
2810
+ }, "strip", z.ZodTypeAny, {
2811
+ requests: {
2812
+ model: string;
2813
+ content: {
2814
+ parts: {
2815
+ text: string;
2816
+ }[];
2817
+ };
2818
+ }[];
2819
+ outputDimensionality?: number | undefined;
2820
+ model?: string | undefined;
2821
+ }, {
2822
+ requests: {
2823
+ model: string;
2824
+ content: {
2825
+ parts: {
2826
+ text: string;
2827
+ }[];
2828
+ };
2829
+ }[];
2830
+ outputDimensionality?: number | undefined;
2831
+ model?: string | undefined;
2832
+ }>;
2833
+ type GoogleEmbeddingRequestType = z.infer<typeof GoogleEmbeddingRequest>;
2834
+
2835
+ declare const BaseEmbeddingModelOptions: z.ZodObject<{
2836
+ apiKey: z.ZodString;
2837
+ baseUrl: z.ZodString;
2838
+ getEmbeddingsUrl: z.ZodOptional<z.ZodString>;
2839
+ }, "strip", z.ZodTypeAny, {
2840
+ apiKey: string;
2841
+ baseUrl: string;
2842
+ getEmbeddingsUrl?: string | undefined;
2843
+ }, {
2844
+ apiKey: string;
2845
+ baseUrl: string;
2846
+ getEmbeddingsUrl?: string | undefined;
2847
+ }>;
2848
+ type BaseEmbeddingModelOptionsType = z.infer<typeof BaseEmbeddingModelOptions>;
2849
+ declare class BaseEmbeddingModel implements EmbeddingModelV1<EmbeddingModelSchemaType> {
2850
+ readonly version: "v1";
2851
+ modelSchema: EmbeddingModelSchemaType;
2852
+ private readonly apiKey;
2853
+ private readonly baseUrl;
2854
+ private readonly getEmbeddingsUrl;
2855
+ constructor(modelSchema: EmbeddingModelSchemaType, options: BaseEmbeddingModelOptionsType);
2856
+ getDefaultBaseUrl(): UrlType;
2857
+ getDefaultHeaders(): HeadersType;
2858
+ getDefaultParams(): ParamsType;
2859
+ getRetryDelay(responseHeaders: HeadersType): {
2860
+ shouldRetry: boolean;
2861
+ delayMs: number;
2862
+ };
2863
+ getTokenCount(requests: EmbeddingRequestsType): number;
2864
+ transformModelRequest(request: any): {
2865
+ modelName: string | undefined;
2866
+ config: ConfigType;
2867
+ embeddingRequests: EmbeddingRequestsType;
2868
+ };
2869
+ transformConfig(config: ConfigType, requests?: EmbeddingRequestsType): ParamsType;
2870
+ transformEmbeddingRequests(requests: EmbeddingRequestsType): ParamsType;
2871
+ getGetEmbeddingsUrl(config?: ConfigType, requests?: EmbeddingRequestsType): Promise<UrlType>;
2872
+ getGetEmbeddingsHeaders(config?: ConfigType, requests?: EmbeddingRequestsType): Promise<HeadersType>;
2873
+ getGetEmbeddingsData(config: ConfigType, requests: EmbeddingRequestsType): Promise<ParamsType>;
2874
+ transformGetEmbeddingsResponse(response: any): EmbeddingResponseType;
2875
+ }
2876
+
2877
+ declare const Text_Embedding_001Literal = "text-embedding-001";
2878
+ declare const Text_Embedding_001Schema: {
2879
+ description: string;
2880
+ name: string;
2881
+ modalities: ["text", ..."text"[]];
2882
+ maxInputTokens: number;
2883
+ maxOutputTokens: number;
2884
+ config: {
2885
+ def: Record<string, {
2886
+ type: "multi-string";
2887
+ param: string;
2888
+ title: string;
2889
+ description: string;
2890
+ max: number;
2891
+ } | {
2892
+ type: "range";
2893
+ param: string;
2894
+ title: string;
2895
+ description: string;
2896
+ max: number;
2897
+ min: number;
2898
+ step: number;
2899
+ default: number;
2900
+ } | {
2901
+ type: "select-string";
2902
+ param: string;
2903
+ title: string;
2904
+ description: string;
2905
+ default: string | null;
2906
+ choices: string[];
2907
+ } | {
2908
+ type: "object-schema";
2909
+ param: string;
2910
+ title: string;
2911
+ description: string;
2912
+ objectSchema?: any;
2913
+ } | {
2914
+ type: "select-boolean";
2915
+ param: string;
2916
+ title: string;
2917
+ description: string;
2918
+ default: boolean | null;
2919
+ }>;
2920
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2921
+ };
2922
+ };
2923
+ declare const Text_Embedding_001Options: z.ZodObject<{
2924
+ apiKey: z.ZodString;
2925
+ baseUrl: z.ZodString;
2926
+ getEmbeddingsUrl: z.ZodOptional<z.ZodString>;
2927
+ }, "strip", z.ZodTypeAny, {
2928
+ apiKey: string;
2929
+ baseUrl: string;
2930
+ getEmbeddingsUrl?: string | undefined;
2931
+ }, {
2932
+ apiKey: string;
2933
+ baseUrl: string;
2934
+ getEmbeddingsUrl?: string | undefined;
2935
+ }>;
2936
+ type Text_Embedding_001OptionsType = z.infer<typeof Text_Embedding_001Options>;
2937
+ declare class Text_Embedding_001 extends BaseEmbeddingModel {
2938
+ constructor(options: Text_Embedding_001OptionsType);
2939
+ }
2940
+
2941
+ declare const Text_Embedding_004Literal = "text-embedding-004";
2942
+ declare const Text_Embedding_004Schema: {
2943
+ description: string;
2944
+ name: string;
2945
+ modalities: ["text", ..."text"[]];
2946
+ maxInputTokens: number;
2947
+ maxOutputTokens: number;
2948
+ config: {
2949
+ def: Record<string, {
2950
+ type: "multi-string";
2951
+ param: string;
2952
+ title: string;
2953
+ description: string;
2954
+ max: number;
2955
+ } | {
2956
+ type: "range";
2957
+ param: string;
2958
+ title: string;
2959
+ description: string;
2960
+ max: number;
2961
+ min: number;
2962
+ step: number;
2963
+ default: number;
2964
+ } | {
2965
+ type: "select-string";
2966
+ param: string;
2967
+ title: string;
2968
+ description: string;
2969
+ default: string | null;
2970
+ choices: string[];
2971
+ } | {
2972
+ type: "object-schema";
2973
+ param: string;
2974
+ title: string;
2975
+ description: string;
2976
+ objectSchema?: any;
2977
+ } | {
2978
+ type: "select-boolean";
2979
+ param: string;
2980
+ title: string;
2981
+ description: string;
2982
+ default: boolean | null;
2983
+ }>;
2984
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2985
+ };
2986
+ };
2987
+ declare const Text_Embedding_004Options: z.ZodObject<{
2988
+ apiKey: z.ZodString;
2989
+ baseUrl: z.ZodString;
2990
+ getEmbeddingsUrl: z.ZodOptional<z.ZodString>;
2991
+ }, "strip", z.ZodTypeAny, {
2992
+ apiKey: string;
2993
+ baseUrl: string;
2994
+ getEmbeddingsUrl?: string | undefined;
2995
+ }, {
2996
+ apiKey: string;
2997
+ baseUrl: string;
2998
+ getEmbeddingsUrl?: string | undefined;
2999
+ }>;
3000
+ type Text_Embedding_004OptionsType = z.infer<typeof Text_Embedding_004Options>;
3001
+ declare class Text_Embedding_004 extends BaseEmbeddingModel {
3002
+ constructor(options: Text_Embedding_004OptionsType);
3003
+ }
3004
+
3005
+ declare const ProviderLiteral = "google";
3006
+ declare class Google<O extends Record<string, any> = Record<string, any>> implements ProviderV1<O> {
3007
+ readonly version: "v1";
3008
+ readonly name = "google";
3009
+ static readonly baseUrl: string;
3010
+ private readonly chatModelFactories;
3011
+ private readonly embeddingModelFactories;
3012
+ chatModelLiterals(): string[];
3013
+ chatModel(name: string, options: O): ChatModelV1;
3014
+ chatModelSchema(name: string): ChatModelSchemaType;
3015
+ chatModelSchemas(): Record<string, ChatModelSchemaType>;
3016
+ embeddingModelLiterals(): string[];
3017
+ embeddingModel(name: string, options: O): EmbeddingModelV1;
3018
+ embeddingModelSchema(name: string): EmbeddingModelSchemaType;
3019
+ embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType>;
3020
+ }
3021
+
3022
+ export { BaseChatModel, BaseChatModelGemini1, BaseChatModelOptions, type BaseChatModelOptionsType, BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, ChatModelC1ConfigDef, ChatModelC1ConfigSchema, EmbeddingModelBaseConfigDef, EmbeddingModelBaseConfigSchema, Gemini1_0Pro, Gemini1_0ProLatest, Gemini1_0ProLatestLiteral, Gemini1_0ProLatestOptions, type Gemini1_0ProLatestOptionsType, Gemini1_0ProLatestSchema, Gemini1_0ProLiteral, Gemini1_0ProOptions, type Gemini1_0ProOptionsType, Gemini1_0ProSchema, Gemini1_0ProVision, Gemini1_0ProVisionLiteral, Gemini1_0ProVisionOptions, type Gemini1_0ProVisionOptionsType, Gemini1_0ProVisionSchema, Gemini1_0Pro_001, Gemini1_0Pro_001Literal, Gemini1_0Pro_001Options, type Gemini1_0Pro_001OptionsType, Gemini1_0Pro_001Schema, Gemini1_5Flash, Gemini1_5Flash001, Gemini1_5Flash001Literal, Gemini1_5Flash001Options, type Gemini1_5Flash001OptionsType, Gemini1_5Flash001Schema, Gemini1_5Flash002, Gemini1_5Flash002Literal, Gemini1_5Flash002Options, type Gemini1_5Flash002OptionsType, Gemini1_5Flash002Schema, Gemini1_5FlashLatest, Gemini1_5FlashLatestLiteral, Gemini1_5FlashLatestOptions, type Gemini1_5FlashLatestOptionsType, Gemini1_5FlashLatestSchema, Gemini1_5FlashLiteral, Gemini1_5FlashOptions, type Gemini1_5FlashOptionsType, Gemini1_5FlashSchema, Gemini1_5Pro, Gemini1_5Pro001, Gemini1_5Pro001Literal, Gemini1_5Pro001Options, type Gemini1_5Pro001OptionsType, Gemini1_5Pro001Schema, Gemini1_5Pro002, Gemini1_5Pro002Literal, Gemini1_5Pro002Options, type Gemini1_5Pro002OptionsType, Gemini1_5Pro002Schema, Gemini1_5ProLatest, Gemini1_5ProLatestLiteral, Gemini1_5ProLatestOptions, type Gemini1_5ProLatestOptionsType, Gemini1_5ProLatestSchema, Gemini1_5ProLiteral, Gemini1_5ProOptions, type Gemini1_5ProOptionsType, Gemini1_5ProSchema, Google, GoogleChatAssistantRoleLiteral, GoogleChatContent, GoogleChatContentPartFunctionCall, type GoogleChatContentPartFunctionCallType, GoogleChatContentPartFunctionResponse, type GoogleChatContentPartFunctionResponseType, GoogleChatContentPartInlineData, type GoogleChatContentPartInlineDataType, GoogleChatContentPartText, type GoogleChatContentPartTextType, type GoogleChatContentType, GoogleChatGenerationConfig, type GoogleChatGenerationConfigType, GoogleChatModelConfigs, GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelRoles, GoogleChatModelRolesMap, GoogleChatModelTextModalities, GoogleChatModelTextModalitiesEnum, GoogleChatModelTextToolModalities, GoogleChatModelTextToolModalitiesEnum, GoogleChatModelTextVisionModalities, GoogleChatModelTextVisionModalitiesEnum, GoogleChatRequest, type GoogleChatRequestType, GoogleChatSystemInstruction, type GoogleChatSystemInstructionType, GoogleChatTool, GoogleChatToolConfig, type GoogleChatToolConfigType, GoogleChatToolRoleLiteral, type GoogleChatToolType, GoogleCompleteChatResponse, type GoogleCompleteChatResponseType, GoogleCompleteChatTextResponse, GoogleCompleteChatToolResponse, GoogleEmbeddingModelConfigs, GoogleEmbeddingModelModalities, GoogleEmbeddingModelModalitiesEnum, GoogleEmbeddingRequest, GoogleEmbeddingRequestInput, type GoogleEmbeddingRequestInputType, type GoogleEmbeddingRequestType, GoogleGetEmbeddingsResponse, type GoogleGetEmbeddingsResponseType, GoogleStreamChatResponse, type GoogleStreamChatResponseType, GoogleStreamChatTextResponse, GoogleStreamChatToolResponse, ProviderLiteral, Text_Embedding_001, Text_Embedding_001Literal, Text_Embedding_001Options, type Text_Embedding_001OptionsType, Text_Embedding_001Schema, Text_Embedding_004, Text_Embedding_004Literal, Text_Embedding_004Options, type Text_Embedding_004OptionsType, Text_Embedding_004Schema, dimensions, frequencyPenalty, maxTokens, presencePenalty, safetySettings, seed, stop, temperature, toolChoice, topK, topP };