@adaline/google 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -90,46 +90,24 @@ declare const GoogleChatModelConfigs: {
90
90
  stop?: string[] | undefined;
91
91
  }>;
92
92
  };
93
- readonly c1: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => {
93
+ readonly responseSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
94
94
  def: {
95
- readonly temperature: {
96
- type: "range";
97
- param: string;
98
- title: string;
99
- description: string;
100
- max: number;
101
- default: number;
102
- min: number;
103
- step: number;
104
- };
105
- readonly maxTokens: {
106
- type: "range";
107
- param: string;
108
- title: string;
109
- description: string;
110
- max: number;
111
- default: number;
112
- min: number;
113
- step: number;
114
- };
115
- readonly stop: {
116
- type: "multi-string";
95
+ responseFormat: {
96
+ type: "select-string";
117
97
  param: string;
118
98
  title: string;
119
99
  description: string;
120
- max: number;
100
+ default: string;
101
+ choices: string[];
121
102
  };
122
- readonly topP: {
123
- type: "range";
103
+ responseSchema: {
104
+ type: "object-schema";
124
105
  param: string;
125
106
  title: string;
126
107
  description: string;
127
- max: number;
128
- default: number;
129
- min: number;
130
- step: number;
108
+ objectSchema?: any;
131
109
  };
132
- readonly topK: {
110
+ temperature: {
133
111
  type: "range";
134
112
  param: string;
135
113
  title: string;
@@ -139,7 +117,7 @@ declare const GoogleChatModelConfigs: {
139
117
  min: number;
140
118
  step: number;
141
119
  };
142
- readonly frequencyPenalty: {
120
+ maxTokens: {
143
121
  type: "range";
144
122
  param: string;
145
123
  title: string;
@@ -149,17 +127,14 @@ declare const GoogleChatModelConfigs: {
149
127
  min: number;
150
128
  step: number;
151
129
  };
152
- readonly presencePenalty: {
153
- type: "range";
130
+ stop: {
131
+ type: "multi-string";
154
132
  param: string;
155
133
  title: string;
156
134
  description: string;
157
135
  max: number;
158
- default: number;
159
- min: number;
160
- step: number;
161
136
  };
162
- readonly seed: {
137
+ topP: {
163
138
  type: "range";
164
139
  param: string;
165
140
  title: string;
@@ -169,7 +144,7 @@ declare const GoogleChatModelConfigs: {
169
144
  min: number;
170
145
  step: number;
171
146
  };
172
- readonly toolChoice: {
147
+ toolChoice: {
173
148
  type: "select-string";
174
149
  param: string;
175
150
  title: string;
@@ -177,7 +152,7 @@ declare const GoogleChatModelConfigs: {
177
152
  default: string;
178
153
  choices: string[];
179
154
  };
180
- readonly safetySettings: {
155
+ safetySettings: {
181
156
  type: "object-schema";
182
157
  param: string;
183
158
  title: string;
@@ -185,89 +160,77 @@ declare const GoogleChatModelConfigs: {
185
160
  objectSchema?: any;
186
161
  };
187
162
  };
188
- schema: zod.ZodObject<{
163
+ schema: zod.ZodObject<zod.objectUtil.extendShape<{
189
164
  temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
190
165
  maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
191
166
  stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
192
167
  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
168
  toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
198
169
  safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
199
170
  [x: string]: any;
200
171
  }, {
201
172
  [x: string]: any;
202
173
  }>>;
203
- }, "strip", zod.ZodTypeAny, {
204
- frequencyPenalty?: number | undefined;
205
- presencePenalty?: number | undefined;
206
- seed?: number | undefined;
174
+ }, {
175
+ responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
176
+ responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
177
+ [x: string]: any;
178
+ }, {
179
+ [x: string]: any;
180
+ }>>;
181
+ }>, "strip", zod.ZodTypeAny, {
207
182
  toolChoice?: string | null | undefined;
208
183
  safetySettings?: {
209
184
  [x: string]: any;
210
185
  } | undefined;
211
186
  temperature?: number | undefined;
212
187
  topP?: number | undefined;
213
- topK?: number | undefined;
214
188
  maxTokens?: number | undefined;
215
189
  stop?: string[] | undefined;
190
+ responseFormat?: string | null | undefined;
191
+ responseSchema?: {
192
+ [x: string]: any;
193
+ } | undefined;
216
194
  }, {
217
- frequencyPenalty?: number | undefined;
218
- presencePenalty?: number | undefined;
219
- seed?: number | undefined;
220
195
  toolChoice?: string | null | undefined;
221
196
  safetySettings?: {
222
197
  [x: string]: any;
223
198
  } | undefined;
224
199
  temperature?: number | undefined;
225
200
  topP?: number | undefined;
226
- topK?: number | undefined;
227
201
  maxTokens?: number | undefined;
228
202
  stop?: string[] | undefined;
203
+ responseFormat?: string | null | undefined;
204
+ responseSchema?: {
205
+ [x: string]: any;
206
+ } | undefined;
229
207
  }>;
230
208
  };
231
- readonly reasoning: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => {
209
+ readonly reasoning: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
232
210
  def: {
233
- readonly temperature: {
234
- type: "range";
235
- param: string;
236
- title: string;
237
- description: string;
238
- max: number;
239
- default: number;
240
- min: number;
241
- step: number;
242
- };
243
- readonly maxTokens: {
244
- type: "range";
211
+ reasoningEnabled: {
212
+ type: "select-boolean";
245
213
  param: string;
246
214
  title: string;
247
215
  description: string;
248
- max: number;
249
- default: number;
250
- min: number;
251
- step: number;
216
+ default: boolean | null;
252
217
  };
253
- readonly stop: {
254
- type: "multi-string";
218
+ responseFormat: {
219
+ type: "select-string";
255
220
  param: string;
256
221
  title: string;
257
222
  description: string;
258
- max: number;
223
+ default: string;
224
+ choices: string[];
259
225
  };
260
- readonly topP: {
261
- type: "range";
226
+ responseSchema: {
227
+ type: "object-schema";
262
228
  param: string;
263
229
  title: string;
264
230
  description: string;
265
- max: number;
266
- default: number;
267
- min: number;
268
- step: number;
231
+ objectSchema?: any;
269
232
  };
270
- readonly topK: {
233
+ temperature: {
271
234
  type: "range";
272
235
  param: string;
273
236
  title: string;
@@ -277,7 +240,7 @@ declare const GoogleChatModelConfigs: {
277
240
  min: number;
278
241
  step: number;
279
242
  };
280
- readonly frequencyPenalty: {
243
+ maxTokens: {
281
244
  type: "range";
282
245
  param: string;
283
246
  title: string;
@@ -287,17 +250,14 @@ declare const GoogleChatModelConfigs: {
287
250
  min: number;
288
251
  step: number;
289
252
  };
290
- readonly presencePenalty: {
291
- type: "range";
253
+ stop: {
254
+ type: "multi-string";
292
255
  param: string;
293
256
  title: string;
294
257
  description: string;
295
258
  max: number;
296
- default: number;
297
- min: number;
298
- step: number;
299
259
  };
300
- readonly seed: {
260
+ topP: {
301
261
  type: "range";
302
262
  param: string;
303
263
  title: string;
@@ -307,7 +267,7 @@ declare const GoogleChatModelConfigs: {
307
267
  min: number;
308
268
  step: number;
309
269
  };
310
- readonly toolChoice: {
270
+ toolChoice: {
311
271
  type: "select-string";
312
272
  param: string;
313
273
  title: string;
@@ -315,41 +275,35 @@ declare const GoogleChatModelConfigs: {
315
275
  default: string;
316
276
  choices: string[];
317
277
  };
318
- readonly safetySettings: {
278
+ safetySettings: {
319
279
  type: "object-schema";
320
280
  param: string;
321
281
  title: string;
322
282
  description: string;
323
283
  objectSchema?: any;
324
284
  };
325
- readonly reasoningEnabled: {
326
- type: "select-boolean";
327
- param: string;
328
- title: string;
329
- description: string;
330
- default: boolean | null;
331
- };
332
285
  };
333
- schema: zod.ZodObject<{
286
+ schema: zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
334
287
  temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
335
288
  maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
336
289
  stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
337
290
  topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
338
- topK: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
339
- frequencyPenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
340
- presencePenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
341
- seed: zod.ZodEffects<zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>, number | undefined, number | undefined>;
342
291
  toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
343
292
  safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
344
293
  [x: string]: any;
345
294
  }, {
346
295
  [x: string]: any;
347
296
  }>>;
297
+ }, {
298
+ responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
299
+ responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
300
+ [x: string]: any;
301
+ }, {
302
+ [x: string]: any;
303
+ }>>;
304
+ }>, {
348
305
  reasoningEnabled: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
349
- }, "strip", zod.ZodTypeAny, {
350
- frequencyPenalty?: number | undefined;
351
- presencePenalty?: number | undefined;
352
- seed?: number | undefined;
306
+ }>, "strip", zod.ZodTypeAny, {
353
307
  toolChoice?: string | null | undefined;
354
308
  safetySettings?: {
355
309
  [x: string]: any;
@@ -357,13 +311,13 @@ declare const GoogleChatModelConfigs: {
357
311
  reasoningEnabled?: boolean | null | undefined;
358
312
  temperature?: number | undefined;
359
313
  topP?: number | undefined;
360
- topK?: number | undefined;
361
314
  maxTokens?: number | undefined;
362
315
  stop?: string[] | undefined;
316
+ responseFormat?: string | null | undefined;
317
+ responseSchema?: {
318
+ [x: string]: any;
319
+ } | undefined;
363
320
  }, {
364
- frequencyPenalty?: number | undefined;
365
- presencePenalty?: number | undefined;
366
- seed?: number | undefined;
367
321
  toolChoice?: string | null | undefined;
368
322
  safetySettings?: {
369
323
  [x: string]: any;
@@ -371,9 +325,12 @@ declare const GoogleChatModelConfigs: {
371
325
  reasoningEnabled?: boolean | null | undefined;
372
326
  temperature?: number | undefined;
373
327
  topP?: number | undefined;
374
- topK?: number | undefined;
375
328
  maxTokens?: number | undefined;
376
329
  stop?: string[] | undefined;
330
+ responseFormat?: string | null | undefined;
331
+ responseSchema?: {
332
+ [x: string]: any;
333
+ } | undefined;
377
334
  }>;
378
335
  };
379
336
  };
@@ -486,143 +443,6 @@ declare const ChatModelBaseConfigDef: (maxTemperature: number, defaultTemperatur
486
443
  };
487
444
  };
488
445
 
489
- declare const ChatModelC1ConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => z.ZodObject<{
490
- temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
491
- maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
492
- stop: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
493
- topP: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
494
- topK: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
495
- frequencyPenalty: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
496
- presencePenalty: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
497
- seed: z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodNumber>>, number | undefined, number | undefined>;
498
- toolChoice: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
499
- safetySettings: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
500
- [x: string]: any;
501
- }, {
502
- [x: string]: any;
503
- }>>;
504
- }, "strip", z.ZodTypeAny, {
505
- frequencyPenalty?: number | undefined;
506
- presencePenalty?: number | undefined;
507
- seed?: number | undefined;
508
- toolChoice?: string | null | undefined;
509
- safetySettings?: {
510
- [x: string]: any;
511
- } | undefined;
512
- temperature?: number | undefined;
513
- topP?: number | undefined;
514
- topK?: number | undefined;
515
- maxTokens?: number | undefined;
516
- stop?: string[] | undefined;
517
- }, {
518
- frequencyPenalty?: number | undefined;
519
- presencePenalty?: number | undefined;
520
- seed?: number | undefined;
521
- toolChoice?: string | null | undefined;
522
- safetySettings?: {
523
- [x: string]: any;
524
- } | undefined;
525
- temperature?: number | undefined;
526
- topP?: number | undefined;
527
- topK?: number | undefined;
528
- maxTokens?: number | undefined;
529
- stop?: string[] | undefined;
530
- }>;
531
- declare const ChatModelC1ConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => {
532
- readonly temperature: {
533
- type: "range";
534
- param: string;
535
- title: string;
536
- description: string;
537
- max: number;
538
- default: number;
539
- min: number;
540
- step: number;
541
- };
542
- readonly maxTokens: {
543
- type: "range";
544
- param: string;
545
- title: string;
546
- description: string;
547
- max: number;
548
- default: number;
549
- min: number;
550
- step: number;
551
- };
552
- readonly stop: {
553
- type: "multi-string";
554
- param: string;
555
- title: string;
556
- description: string;
557
- max: number;
558
- };
559
- readonly topP: {
560
- type: "range";
561
- param: string;
562
- title: string;
563
- description: string;
564
- max: number;
565
- default: number;
566
- min: number;
567
- step: number;
568
- };
569
- readonly topK: {
570
- type: "range";
571
- param: string;
572
- title: string;
573
- description: string;
574
- max: number;
575
- default: number;
576
- min: number;
577
- step: number;
578
- };
579
- readonly frequencyPenalty: {
580
- type: "range";
581
- param: string;
582
- title: string;
583
- description: string;
584
- max: number;
585
- default: number;
586
- min: number;
587
- step: number;
588
- };
589
- readonly presencePenalty: {
590
- type: "range";
591
- param: string;
592
- title: string;
593
- description: string;
594
- max: number;
595
- default: number;
596
- min: number;
597
- step: number;
598
- };
599
- readonly seed: {
600
- type: "range";
601
- param: string;
602
- title: string;
603
- description: string;
604
- max: number;
605
- default: number;
606
- min: number;
607
- step: number;
608
- };
609
- readonly toolChoice: {
610
- type: "select-string";
611
- param: string;
612
- title: string;
613
- description: string;
614
- default: string;
615
- choices: string[];
616
- };
617
- readonly safetySettings: {
618
- type: "object-schema";
619
- param: string;
620
- title: string;
621
- description: string;
622
- objectSchema?: any;
623
- };
624
- };
625
-
626
446
  declare const temperature: (max: number, _default: number) => {
627
447
  def: {
628
448
  type: "range";
@@ -760,26 +580,27 @@ declare const reasoningEnabled: {
760
580
  schema: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
761
581
  };
762
582
 
763
- declare const ChatModelReasoningConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => z.ZodObject<{
764
- temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
765
- maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
766
- stop: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
767
- topP: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
768
- topK: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
769
- frequencyPenalty: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
770
- presencePenalty: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
771
- seed: z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodNumber>>, number | undefined, number | undefined>;
772
- toolChoice: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
773
- safetySettings: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
583
+ declare const ChatModelReasoningConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
584
+ temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
585
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
586
+ stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
587
+ topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
588
+ toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
589
+ safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
774
590
  [x: string]: any;
775
591
  }, {
776
592
  [x: string]: any;
777
593
  }>>;
778
- reasoningEnabled: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
779
- }, "strip", z.ZodTypeAny, {
780
- frequencyPenalty?: number | undefined;
781
- presencePenalty?: number | undefined;
782
- seed?: number | undefined;
594
+ }, {
595
+ responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
596
+ responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
597
+ [x: string]: any;
598
+ }, {
599
+ [x: string]: any;
600
+ }>>;
601
+ }>, {
602
+ reasoningEnabled: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
603
+ }>, "strip", zod.ZodTypeAny, {
783
604
  toolChoice?: string | null | undefined;
784
605
  safetySettings?: {
785
606
  [x: string]: any;
@@ -787,13 +608,13 @@ declare const ChatModelReasoningConfigSchema: (maxTemperature: number, defaultTe
787
608
  reasoningEnabled?: boolean | null | undefined;
788
609
  temperature?: number | undefined;
789
610
  topP?: number | undefined;
790
- topK?: number | undefined;
791
611
  maxTokens?: number | undefined;
792
612
  stop?: string[] | undefined;
613
+ responseFormat?: string | null | undefined;
614
+ responseSchema?: {
615
+ [x: string]: any;
616
+ } | undefined;
793
617
  }, {
794
- frequencyPenalty?: number | undefined;
795
- presencePenalty?: number | undefined;
796
- seed?: number | undefined;
797
618
  toolChoice?: string | null | undefined;
798
619
  safetySettings?: {
799
620
  [x: string]: any;
@@ -801,12 +622,37 @@ declare const ChatModelReasoningConfigSchema: (maxTemperature: number, defaultTe
801
622
  reasoningEnabled?: boolean | null | undefined;
802
623
  temperature?: number | undefined;
803
624
  topP?: number | undefined;
804
- topK?: number | undefined;
805
625
  maxTokens?: number | undefined;
806
626
  stop?: string[] | undefined;
627
+ responseFormat?: string | null | undefined;
628
+ responseSchema?: {
629
+ [x: string]: any;
630
+ } | undefined;
807
631
  }>;
808
- declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number, defaultTopK: number) => {
809
- readonly temperature: {
632
+ declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
633
+ reasoningEnabled: {
634
+ type: "select-boolean";
635
+ param: string;
636
+ title: string;
637
+ description: string;
638
+ default: boolean | null;
639
+ };
640
+ responseFormat: {
641
+ type: "select-string";
642
+ param: string;
643
+ title: string;
644
+ description: string;
645
+ default: string;
646
+ choices: string[];
647
+ };
648
+ responseSchema: {
649
+ type: "object-schema";
650
+ param: string;
651
+ title: string;
652
+ description: string;
653
+ objectSchema?: any;
654
+ };
655
+ temperature: {
810
656
  type: "range";
811
657
  param: string;
812
658
  title: string;
@@ -816,7 +662,7 @@ declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTempe
816
662
  min: number;
817
663
  step: number;
818
664
  };
819
- readonly maxTokens: {
665
+ maxTokens: {
820
666
  type: "range";
821
667
  param: string;
822
668
  title: string;
@@ -826,14 +672,14 @@ declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTempe
826
672
  min: number;
827
673
  step: number;
828
674
  };
829
- readonly stop: {
675
+ stop: {
830
676
  type: "multi-string";
831
677
  param: string;
832
678
  title: string;
833
679
  description: string;
834
680
  max: number;
835
681
  };
836
- readonly topP: {
682
+ topP: {
837
683
  type: "range";
838
684
  param: string;
839
685
  title: string;
@@ -843,7 +689,40 @@ declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTempe
843
689
  min: number;
844
690
  step: number;
845
691
  };
846
- readonly topK: {
692
+ toolChoice: {
693
+ type: "select-string";
694
+ param: string;
695
+ title: string;
696
+ description: string;
697
+ default: string;
698
+ choices: string[];
699
+ };
700
+ safetySettings: {
701
+ type: "object-schema";
702
+ param: string;
703
+ title: string;
704
+ description: string;
705
+ objectSchema?: any;
706
+ };
707
+ };
708
+
709
+ declare const GoogleChatModelResponseSchemaConfigDef: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => {
710
+ responseFormat: {
711
+ type: "select-string";
712
+ param: string;
713
+ title: string;
714
+ description: string;
715
+ default: string;
716
+ choices: string[];
717
+ };
718
+ responseSchema: {
719
+ type: "object-schema";
720
+ param: string;
721
+ title: string;
722
+ description: string;
723
+ objectSchema?: any;
724
+ };
725
+ temperature: {
847
726
  type: "range";
848
727
  param: string;
849
728
  title: string;
@@ -853,7 +732,7 @@ declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTempe
853
732
  min: number;
854
733
  step: number;
855
734
  };
856
- readonly frequencyPenalty: {
735
+ maxTokens: {
857
736
  type: "range";
858
737
  param: string;
859
738
  title: string;
@@ -863,17 +742,14 @@ declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTempe
863
742
  min: number;
864
743
  step: number;
865
744
  };
866
- readonly presencePenalty: {
867
- type: "range";
745
+ stop: {
746
+ type: "multi-string";
868
747
  param: string;
869
748
  title: string;
870
749
  description: string;
871
750
  max: number;
872
- default: number;
873
- min: number;
874
- step: number;
875
751
  };
876
- readonly seed: {
752
+ topP: {
877
753
  type: "range";
878
754
  param: string;
879
755
  title: string;
@@ -883,7 +759,7 @@ declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTempe
883
759
  min: number;
884
760
  step: number;
885
761
  };
886
- readonly toolChoice: {
762
+ toolChoice: {
887
763
  type: "select-string";
888
764
  param: string;
889
765
  title: string;
@@ -891,21 +767,59 @@ declare const ChatModelReasoningConfigDef: (maxTemperature: number, defaultTempe
891
767
  default: string;
892
768
  choices: string[];
893
769
  };
894
- readonly safetySettings: {
770
+ safetySettings: {
895
771
  type: "object-schema";
896
772
  param: string;
897
773
  title: string;
898
774
  description: string;
899
775
  objectSchema?: any;
900
776
  };
901
- readonly reasoningEnabled: {
902
- type: "select-boolean";
903
- param: string;
904
- title: string;
905
- description: string;
906
- default: boolean | null;
907
- };
908
777
  };
778
+ declare const GoogleChatModelResponseSchemaConfigSchema: (maxTemperature: number, defaultTemperature: number, maxOutputTokens: number, maxSequences: number, defaultTopP: number) => zod.ZodObject<zod.objectUtil.extendShape<{
779
+ temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
780
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
781
+ stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
782
+ topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
783
+ toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
784
+ safetySettings: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
785
+ [x: string]: any;
786
+ }, {
787
+ [x: string]: any;
788
+ }>>;
789
+ }, {
790
+ responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
791
+ responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
792
+ [x: string]: any;
793
+ }, {
794
+ [x: string]: any;
795
+ }>>;
796
+ }>, "strip", zod.ZodTypeAny, {
797
+ toolChoice?: string | null | undefined;
798
+ safetySettings?: {
799
+ [x: string]: any;
800
+ } | undefined;
801
+ temperature?: number | undefined;
802
+ topP?: number | undefined;
803
+ maxTokens?: number | undefined;
804
+ stop?: string[] | undefined;
805
+ responseFormat?: string | null | undefined;
806
+ responseSchema?: {
807
+ [x: string]: any;
808
+ } | undefined;
809
+ }, {
810
+ toolChoice?: string | null | undefined;
811
+ safetySettings?: {
812
+ [x: string]: any;
813
+ } | undefined;
814
+ temperature?: number | undefined;
815
+ topP?: number | undefined;
816
+ maxTokens?: number | undefined;
817
+ stop?: string[] | undefined;
818
+ responseFormat?: string | null | undefined;
819
+ responseSchema?: {
820
+ [x: string]: any;
821
+ } | undefined;
822
+ }>;
909
823
 
910
824
  declare const EmbeddingModelBaseConfigSchema: (maxDimensions: number) => z.ZodObject<{
911
825
  dimensions: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
@@ -2158,431 +2072,39 @@ declare const GoogleChatRequest: z.ZodObject<{
2158
2072
  frequencyPenalty?: number | undefined;
2159
2073
  presencePenalty?: number | undefined;
2160
2074
  seed?: number | undefined;
2161
- temperature?: number | undefined;
2162
- maxOutputTokens?: number | undefined;
2163
- stopSequences?: string[] | undefined;
2164
- topP?: number | undefined;
2165
- topK?: number | undefined;
2166
- } | undefined;
2167
- safety_settings?: {
2168
- threshold: "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF";
2169
- category: "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_CIVIC_INTEGRITY";
2170
- }[] | undefined;
2171
- tools?: {
2172
- function_declarations: {
2173
- description: string;
2174
- name: string;
2175
- parameters?: any;
2176
- }[];
2177
- } | undefined;
2178
- toolConfig?: {
2179
- function_calling_config: {
2180
- mode: "ANY" | "AUTO" | "NONE";
2181
- allowed_function_names?: string[] | undefined;
2182
- };
2183
- } | undefined;
2184
- tool_config?: {
2185
- function_calling_config: {
2186
- mode: "ANY" | "AUTO" | "NONE";
2187
- allowed_function_names?: string[] | undefined;
2188
- };
2189
- } | undefined;
2190
- }>;
2191
- type GoogleChatRequestType = z.infer<typeof GoogleChatRequest>;
2192
-
2193
- declare const BaseChatModelOptions: z.ZodObject<{
2194
- modelName: z.ZodString;
2195
- apiKey: z.ZodString;
2196
- baseUrl: z.ZodOptional<z.ZodString>;
2197
- completeChatUrl: z.ZodOptional<z.ZodString>;
2198
- streamChatUrl: z.ZodOptional<z.ZodString>;
2199
- }, "strip", z.ZodTypeAny, {
2200
- modelName: string;
2201
- apiKey: string;
2202
- baseUrl?: string | undefined;
2203
- completeChatUrl?: string | undefined;
2204
- streamChatUrl?: string | undefined;
2205
- }, {
2206
- modelName: string;
2207
- apiKey: string;
2208
- baseUrl?: string | undefined;
2209
- completeChatUrl?: string | undefined;
2210
- streamChatUrl?: string | undefined;
2211
- }>;
2212
- type BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;
2213
- declare class BaseChatModel implements ChatModelV1<ChatModelSchemaType> {
2214
- readonly version: "v1";
2215
- modelSchema: ChatModelSchemaType;
2216
- readonly modelName: string;
2217
- private readonly apiKey;
2218
- private readonly baseUrl;
2219
- private readonly streamChatUrl;
2220
- private readonly completeChatUrl;
2221
- constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
2222
- getDefaultBaseUrl(): UrlType;
2223
- getDefaultHeaders(): HeadersType;
2224
- getDefaultParams(): ParamsType;
2225
- getRetryDelay(responseHeaders: HeadersType): {
2226
- shouldRetry: boolean;
2227
- delayMs: number;
2228
- };
2229
- getTokenCount(messages: MessageType[]): number;
2230
- transformModelRequest(request: GoogleChatRequestType): {
2231
- modelName: string | undefined;
2232
- config: ConfigType;
2233
- messages: MessageType[];
2234
- tools: ToolType[] | undefined;
2235
- };
2236
- transformConfig(config: ConfigType, messages?: MessageType[], tools?: ToolType[]): ParamsType;
2237
- transformMessages(messages: MessageType[]): ParamsType;
2238
- transformTools(tools: ToolType[]): ParamsType;
2239
- getCompleteChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
2240
- getCompleteChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
2241
- getCompleteChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
2242
- transformCompleteChatResponse(response: any): ChatResponseType;
2243
- getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
2244
- getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
2245
- getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
2246
- transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
2247
- partialResponse: PartialChatResponseType;
2248
- buffer: string;
2249
- }>;
2250
- transformProxyStreamChatResponseChunk(chunk: string, buffer: string, data?: any, headers?: Record<string, string>, query?: Record<string, string>): AsyncGenerator<{
2251
- partialResponse: PartialChatResponseType;
2252
- buffer: string;
2253
- }>;
2254
- getProxyCompleteChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
2255
- getProxyStreamChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
2256
- getProxyCompleteChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
2257
- getProxyStreamChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
2258
- getModelPricing(): ChatModelPriceType;
2259
- }
2260
-
2261
- declare class BaseChatModelGemini1 extends BaseChatModel {
2262
- transformMessages(messages: MessageType[]): ParamsType;
2263
- }
2264
-
2265
- declare const Gemini1_0Pro_001Literal = "gemini-1.0-pro-001";
2266
- declare const Gemini1_0Pro_001Schema: {
2267
- description: string;
2268
- maxOutputTokens: number;
2269
- name: string;
2270
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2271
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
2272
- maxInputTokens: number;
2273
- config: {
2274
- def: Record<string, {
2275
- type: "multi-string";
2276
- param: string;
2277
- title: string;
2278
- description: string;
2279
- max: number;
2280
- } | {
2281
- type: "object-schema";
2282
- param: string;
2283
- title: string;
2284
- description: string;
2285
- objectSchema?: any;
2286
- } | {
2287
- type: "range";
2288
- param: string;
2289
- title: string;
2290
- description: string;
2291
- max: number;
2292
- default: number;
2293
- min: number;
2294
- step: number;
2295
- } | {
2296
- type: "select-boolean";
2297
- param: string;
2298
- title: string;
2299
- description: string;
2300
- default: boolean | null;
2301
- } | {
2302
- type: "select-string";
2303
- param: string;
2304
- title: string;
2305
- description: string;
2306
- default: string;
2307
- choices: string[];
2308
- }>;
2309
- schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2310
- };
2311
- price: {
2312
- modelName: string;
2313
- currency: string;
2314
- tokenRanges: {
2315
- minTokens: number;
2316
- prices: {
2317
- base: {
2318
- inputPricePerMillion: number;
2319
- outputPricePerMillion: number;
2320
- };
2321
- };
2322
- maxTokens?: number | null | undefined;
2323
- }[];
2324
- };
2325
- maxReasoningTokens?: number | undefined;
2326
- };
2327
- declare const Gemini1_0Pro_001Options: z.ZodObject<{
2328
- modelName: z.ZodString;
2329
- apiKey: z.ZodString;
2330
- baseUrl: z.ZodOptional<z.ZodString>;
2331
- completeChatUrl: z.ZodOptional<z.ZodString>;
2332
- streamChatUrl: z.ZodOptional<z.ZodString>;
2333
- }, "strip", z.ZodTypeAny, {
2334
- modelName: string;
2335
- apiKey: string;
2336
- baseUrl?: string | undefined;
2337
- completeChatUrl?: string | undefined;
2338
- streamChatUrl?: string | undefined;
2339
- }, {
2340
- modelName: string;
2341
- apiKey: string;
2342
- baseUrl?: string | undefined;
2343
- completeChatUrl?: string | undefined;
2344
- streamChatUrl?: string | undefined;
2345
- }>;
2346
- type Gemini1_0Pro_001OptionsType = z.infer<typeof Gemini1_0Pro_001Options>;
2347
- declare class Gemini1_0Pro_001 extends BaseChatModelGemini1 {
2348
- constructor(options: Gemini1_0Pro_001OptionsType);
2349
- }
2350
-
2351
- declare const Gemini1_0ProLatestLiteral = "gemini-1.0-pro-latest";
2352
- declare const Gemini1_0ProLatestSchema: {
2353
- description: string;
2354
- maxOutputTokens: number;
2355
- name: string;
2356
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2357
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
2358
- maxInputTokens: number;
2359
- config: {
2360
- def: Record<string, {
2361
- type: "multi-string";
2362
- param: string;
2363
- title: string;
2364
- description: string;
2365
- max: number;
2366
- } | {
2367
- type: "object-schema";
2368
- param: string;
2369
- title: string;
2370
- description: string;
2371
- objectSchema?: any;
2372
- } | {
2373
- type: "range";
2374
- param: string;
2375
- title: string;
2376
- description: string;
2377
- max: number;
2378
- default: number;
2379
- min: number;
2380
- step: number;
2381
- } | {
2382
- type: "select-boolean";
2383
- param: string;
2384
- title: string;
2385
- description: string;
2386
- default: boolean | null;
2387
- } | {
2388
- type: "select-string";
2389
- param: string;
2390
- title: string;
2391
- description: string;
2392
- default: string;
2393
- choices: string[];
2394
- }>;
2395
- schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2396
- };
2397
- price: {
2398
- modelName: string;
2399
- currency: string;
2400
- tokenRanges: {
2401
- minTokens: number;
2402
- prices: {
2403
- base: {
2404
- inputPricePerMillion: number;
2405
- outputPricePerMillion: number;
2406
- };
2407
- };
2408
- maxTokens?: number | null | undefined;
2409
- }[];
2410
- };
2411
- maxReasoningTokens?: number | undefined;
2412
- };
2413
- declare const Gemini1_0ProLatestOptions: z.ZodObject<{
2414
- modelName: z.ZodString;
2415
- apiKey: z.ZodString;
2416
- baseUrl: z.ZodOptional<z.ZodString>;
2417
- completeChatUrl: z.ZodOptional<z.ZodString>;
2418
- streamChatUrl: z.ZodOptional<z.ZodString>;
2419
- }, "strip", z.ZodTypeAny, {
2420
- modelName: string;
2421
- apiKey: string;
2422
- baseUrl?: string | undefined;
2423
- completeChatUrl?: string | undefined;
2424
- streamChatUrl?: string | undefined;
2425
- }, {
2426
- modelName: string;
2427
- apiKey: string;
2428
- baseUrl?: string | undefined;
2429
- completeChatUrl?: string | undefined;
2430
- streamChatUrl?: string | undefined;
2431
- }>;
2432
- type Gemini1_0ProLatestOptionsType = z.infer<typeof Gemini1_0ProLatestOptions>;
2433
- declare class Gemini1_0ProLatest extends BaseChatModelGemini1 {
2434
- constructor(options: Gemini1_0ProLatestOptionsType);
2435
- }
2436
-
2437
- declare const Gemini1_0ProVisionLiteral = "gemini-1.0-pro-vision";
2438
- declare const Gemini1_0ProVisionSchema: {
2439
- description: string;
2440
- maxOutputTokens: number;
2441
- name: string;
2442
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2443
- modalities: ["text" | "image", ...("text" | "image")[]];
2444
- maxInputTokens: number;
2445
- config: {
2446
- def: Record<string, {
2447
- type: "multi-string";
2448
- param: string;
2449
- title: string;
2450
- description: string;
2451
- max: number;
2452
- } | {
2453
- type: "object-schema";
2454
- param: string;
2455
- title: string;
2456
- description: string;
2457
- objectSchema?: any;
2458
- } | {
2459
- type: "range";
2460
- param: string;
2461
- title: string;
2462
- description: string;
2463
- max: number;
2464
- default: number;
2465
- min: number;
2466
- step: number;
2467
- } | {
2468
- type: "select-boolean";
2469
- param: string;
2470
- title: string;
2471
- description: string;
2472
- default: boolean | null;
2473
- } | {
2474
- type: "select-string";
2475
- param: string;
2476
- title: string;
2477
- description: string;
2478
- default: string;
2479
- choices: string[];
2480
- }>;
2481
- schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2482
- };
2483
- price: {
2484
- modelName: string;
2485
- currency: string;
2486
- tokenRanges: {
2487
- minTokens: number;
2488
- prices: {
2489
- base: {
2490
- inputPricePerMillion: number;
2491
- outputPricePerMillion: number;
2492
- };
2493
- };
2494
- maxTokens?: number | null | undefined;
2495
- }[];
2496
- };
2497
- maxReasoningTokens?: number | undefined;
2498
- };
2499
- declare const Gemini1_0ProVisionOptions: z.ZodObject<{
2500
- modelName: z.ZodString;
2501
- apiKey: z.ZodString;
2502
- baseUrl: z.ZodOptional<z.ZodString>;
2503
- completeChatUrl: z.ZodOptional<z.ZodString>;
2504
- streamChatUrl: z.ZodOptional<z.ZodString>;
2505
- }, "strip", z.ZodTypeAny, {
2506
- modelName: string;
2507
- apiKey: string;
2508
- baseUrl?: string | undefined;
2509
- completeChatUrl?: string | undefined;
2510
- streamChatUrl?: string | undefined;
2511
- }, {
2512
- modelName: string;
2513
- apiKey: string;
2514
- baseUrl?: string | undefined;
2515
- completeChatUrl?: string | undefined;
2516
- streamChatUrl?: string | undefined;
2517
- }>;
2518
- type Gemini1_0ProVisionOptionsType = z.infer<typeof Gemini1_0ProVisionOptions>;
2519
- declare class Gemini1_0ProVision extends BaseChatModelGemini1 {
2520
- constructor(options: Gemini1_0ProVisionOptionsType);
2521
- }
2522
-
2523
- declare const Gemini1_0ProLiteral = "gemini-1.0-pro";
2524
- declare const Gemini1_0ProSchema: {
2525
- description: string;
2526
- maxOutputTokens: number;
2527
- name: string;
2528
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
2529
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
2530
- maxInputTokens: number;
2531
- config: {
2532
- def: Record<string, {
2533
- type: "multi-string";
2534
- param: string;
2535
- title: string;
2536
- description: string;
2537
- max: number;
2538
- } | {
2539
- type: "object-schema";
2540
- param: string;
2541
- title: string;
2542
- description: string;
2543
- objectSchema?: any;
2544
- } | {
2545
- type: "range";
2546
- param: string;
2547
- title: string;
2548
- description: string;
2549
- max: number;
2550
- default: number;
2551
- min: number;
2552
- step: number;
2553
- } | {
2554
- type: "select-boolean";
2555
- param: string;
2556
- title: string;
2557
- description: string;
2558
- default: boolean | null;
2559
- } | {
2560
- type: "select-string";
2561
- param: string;
2562
- title: string;
2075
+ temperature?: number | undefined;
2076
+ maxOutputTokens?: number | undefined;
2077
+ stopSequences?: string[] | undefined;
2078
+ topP?: number | undefined;
2079
+ topK?: number | undefined;
2080
+ } | undefined;
2081
+ safety_settings?: {
2082
+ threshold: "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF";
2083
+ category: "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_CIVIC_INTEGRITY";
2084
+ }[] | undefined;
2085
+ tools?: {
2086
+ function_declarations: {
2563
2087
  description: string;
2564
- default: string;
2565
- choices: string[];
2566
- }>;
2567
- schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2568
- };
2569
- price: {
2570
- modelName: string;
2571
- currency: string;
2572
- tokenRanges: {
2573
- minTokens: number;
2574
- prices: {
2575
- base: {
2576
- inputPricePerMillion: number;
2577
- outputPricePerMillion: number;
2578
- };
2579
- };
2580
- maxTokens?: number | null | undefined;
2088
+ name: string;
2089
+ parameters?: any;
2581
2090
  }[];
2582
- };
2583
- maxReasoningTokens?: number | undefined;
2584
- };
2585
- declare const Gemini1_0ProOptions: z.ZodObject<{
2091
+ } | undefined;
2092
+ toolConfig?: {
2093
+ function_calling_config: {
2094
+ mode: "ANY" | "AUTO" | "NONE";
2095
+ allowed_function_names?: string[] | undefined;
2096
+ };
2097
+ } | undefined;
2098
+ tool_config?: {
2099
+ function_calling_config: {
2100
+ mode: "ANY" | "AUTO" | "NONE";
2101
+ allowed_function_names?: string[] | undefined;
2102
+ };
2103
+ } | undefined;
2104
+ }>;
2105
+ type GoogleChatRequestType = z.infer<typeof GoogleChatRequest>;
2106
+
2107
+ declare const BaseChatModelOptions: z.ZodObject<{
2586
2108
  modelName: z.ZodString;
2587
2109
  apiKey: z.ZodString;
2588
2110
  baseUrl: z.ZodOptional<z.ZodString>;
@@ -2601,9 +2123,53 @@ declare const Gemini1_0ProOptions: z.ZodObject<{
2601
2123
  completeChatUrl?: string | undefined;
2602
2124
  streamChatUrl?: string | undefined;
2603
2125
  }>;
2604
- type Gemini1_0ProOptionsType = z.infer<typeof Gemini1_0ProOptions>;
2605
- declare class Gemini1_0Pro extends BaseChatModelGemini1 {
2606
- constructor(options: Gemini1_0ProOptionsType);
2126
+ type BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;
2127
+ declare class BaseChatModel implements ChatModelV1<ChatModelSchemaType> {
2128
+ readonly version: "v1";
2129
+ modelSchema: ChatModelSchemaType;
2130
+ readonly modelName: string;
2131
+ private readonly apiKey;
2132
+ private readonly baseUrl;
2133
+ private readonly streamChatUrl;
2134
+ private readonly completeChatUrl;
2135
+ constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
2136
+ getDefaultBaseUrl(): UrlType;
2137
+ getDefaultHeaders(): HeadersType;
2138
+ getDefaultParams(): ParamsType;
2139
+ getRetryDelay(responseHeaders: HeadersType): {
2140
+ shouldRetry: boolean;
2141
+ delayMs: number;
2142
+ };
2143
+ getTokenCount(messages: MessageType[]): number;
2144
+ transformModelRequest(request: GoogleChatRequestType): {
2145
+ modelName: string | undefined;
2146
+ config: ConfigType;
2147
+ messages: MessageType[];
2148
+ tools: ToolType[] | undefined;
2149
+ };
2150
+ transformConfig(config: ConfigType, messages?: MessageType[], tools?: ToolType[]): ParamsType;
2151
+ transformMessages(messages: MessageType[]): ParamsType;
2152
+ transformTools(tools: ToolType[]): ParamsType;
2153
+ getCompleteChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
2154
+ getCompleteChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
2155
+ getCompleteChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
2156
+ transformCompleteChatResponse(response: any): ChatResponseType;
2157
+ getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
2158
+ getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
2159
+ getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
2160
+ transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
2161
+ partialResponse: PartialChatResponseType;
2162
+ buffer: string;
2163
+ }>;
2164
+ transformProxyStreamChatResponseChunk(chunk: string, buffer: string, data?: any, headers?: Record<string, string>, query?: Record<string, string>): AsyncGenerator<{
2165
+ partialResponse: PartialChatResponseType;
2166
+ buffer: string;
2167
+ }>;
2168
+ getProxyCompleteChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
2169
+ getProxyStreamChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
2170
+ getProxyCompleteChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
2171
+ getProxyStreamChatHeaders(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<HeadersType>;
2172
+ getModelPricing(): ChatModelPriceType;
2607
2173
  }
2608
2174
 
2609
2175
  declare const Gemini1_5Flash001Literal = "gemini-1.5-flash-001";
@@ -3552,178 +3118,6 @@ declare class Gemini2_5ProPreview0325 extends BaseChatModel {
3552
3118
  constructor(options: Gemini2_5ProPreview0325OptionsType);
3553
3119
  }
3554
3120
 
3555
- declare const GeminiProVisionLiteral = "gemini-pro-vision";
3556
- declare const GeminiProVisionSchema: {
3557
- description: string;
3558
- maxOutputTokens: number;
3559
- name: string;
3560
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
3561
- modalities: ["text" | "image", ...("text" | "image")[]];
3562
- maxInputTokens: number;
3563
- config: {
3564
- def: Record<string, {
3565
- type: "multi-string";
3566
- param: string;
3567
- title: string;
3568
- description: string;
3569
- max: number;
3570
- } | {
3571
- type: "object-schema";
3572
- param: string;
3573
- title: string;
3574
- description: string;
3575
- objectSchema?: any;
3576
- } | {
3577
- type: "range";
3578
- param: string;
3579
- title: string;
3580
- description: string;
3581
- max: number;
3582
- default: number;
3583
- min: number;
3584
- step: number;
3585
- } | {
3586
- type: "select-boolean";
3587
- param: string;
3588
- title: string;
3589
- description: string;
3590
- default: boolean | null;
3591
- } | {
3592
- type: "select-string";
3593
- param: string;
3594
- title: string;
3595
- description: string;
3596
- default: string;
3597
- choices: string[];
3598
- }>;
3599
- schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
3600
- };
3601
- price: {
3602
- modelName: string;
3603
- currency: string;
3604
- tokenRanges: {
3605
- minTokens: number;
3606
- prices: {
3607
- base: {
3608
- inputPricePerMillion: number;
3609
- outputPricePerMillion: number;
3610
- };
3611
- };
3612
- maxTokens?: number | null | undefined;
3613
- }[];
3614
- };
3615
- maxReasoningTokens?: number | undefined;
3616
- };
3617
- declare const GeminiProVisionOptions: z.ZodObject<{
3618
- modelName: z.ZodString;
3619
- apiKey: z.ZodString;
3620
- baseUrl: z.ZodOptional<z.ZodString>;
3621
- completeChatUrl: z.ZodOptional<z.ZodString>;
3622
- streamChatUrl: z.ZodOptional<z.ZodString>;
3623
- }, "strip", z.ZodTypeAny, {
3624
- modelName: string;
3625
- apiKey: string;
3626
- baseUrl?: string | undefined;
3627
- completeChatUrl?: string | undefined;
3628
- streamChatUrl?: string | undefined;
3629
- }, {
3630
- modelName: string;
3631
- apiKey: string;
3632
- baseUrl?: string | undefined;
3633
- completeChatUrl?: string | undefined;
3634
- streamChatUrl?: string | undefined;
3635
- }>;
3636
- type GeminiProVisionOptionsType = z.infer<typeof GeminiProVisionOptions>;
3637
- declare class GeminiProVision extends BaseChatModelGemini1 {
3638
- constructor(options: GeminiProVisionOptionsType);
3639
- }
3640
-
3641
- declare const GeminiProLiteral = "gemini-pro";
3642
- declare const GeminiProSchema: {
3643
- description: string;
3644
- maxOutputTokens: number;
3645
- name: string;
3646
- roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
3647
- modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
3648
- maxInputTokens: number;
3649
- config: {
3650
- def: Record<string, {
3651
- type: "multi-string";
3652
- param: string;
3653
- title: string;
3654
- description: string;
3655
- max: number;
3656
- } | {
3657
- type: "object-schema";
3658
- param: string;
3659
- title: string;
3660
- description: string;
3661
- objectSchema?: any;
3662
- } | {
3663
- type: "range";
3664
- param: string;
3665
- title: string;
3666
- description: string;
3667
- max: number;
3668
- default: number;
3669
- min: number;
3670
- step: number;
3671
- } | {
3672
- type: "select-boolean";
3673
- param: string;
3674
- title: string;
3675
- description: string;
3676
- default: boolean | null;
3677
- } | {
3678
- type: "select-string";
3679
- param: string;
3680
- title: string;
3681
- description: string;
3682
- default: string;
3683
- choices: string[];
3684
- }>;
3685
- schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
3686
- };
3687
- price: {
3688
- modelName: string;
3689
- currency: string;
3690
- tokenRanges: {
3691
- minTokens: number;
3692
- prices: {
3693
- base: {
3694
- inputPricePerMillion: number;
3695
- outputPricePerMillion: number;
3696
- };
3697
- };
3698
- maxTokens?: number | null | undefined;
3699
- }[];
3700
- };
3701
- maxReasoningTokens?: number | undefined;
3702
- };
3703
- declare const GeminiProOptions: z.ZodObject<{
3704
- modelName: z.ZodString;
3705
- apiKey: z.ZodString;
3706
- baseUrl: z.ZodOptional<z.ZodString>;
3707
- completeChatUrl: z.ZodOptional<z.ZodString>;
3708
- streamChatUrl: z.ZodOptional<z.ZodString>;
3709
- }, "strip", z.ZodTypeAny, {
3710
- modelName: string;
3711
- apiKey: string;
3712
- baseUrl?: string | undefined;
3713
- completeChatUrl?: string | undefined;
3714
- streamChatUrl?: string | undefined;
3715
- }, {
3716
- modelName: string;
3717
- apiKey: string;
3718
- baseUrl?: string | undefined;
3719
- completeChatUrl?: string | undefined;
3720
- streamChatUrl?: string | undefined;
3721
- }>;
3722
- type GeminiProOptionsType = z.infer<typeof GeminiProOptions>;
3723
- declare class GeminiPro extends BaseChatModelGemini1 {
3724
- constructor(options: GeminiProOptionsType);
3725
- }
3726
-
3727
3121
  declare const GoogleEmbeddingModelModalities: EmbeddingModelSchemaType["modalities"];
3728
3122
  declare const GoogleEmbeddingModelModalitiesEnum: z.ZodEnum<["text"]>;
3729
3123
 
@@ -4038,4 +3432,4 @@ declare class Google<C extends BaseChatModelOptionsType, E extends BaseEmbedding
4038
3432
  embeddingModel(options: E): EmbeddingModelV1;
4039
3433
  }
4040
3434
 
4041
- export { BaseChatModel, BaseChatModelGemini1, BaseChatModelOptions, type BaseChatModelOptionsType, BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, ChatModelC1ConfigDef, ChatModelC1ConfigSchema, ChatModelReasoningConfigDef, ChatModelReasoningConfigSchema, 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, Gemini2_0FlashExp, Gemini2_0FlashExpLiteral, Gemini2_0FlashExpOptions, type Gemini2_0FlashExpOptionsType, Gemini2_0FlashExpSchema, Gemini2_5FlashPreview0417, Gemini2_5FlashPreview0417Literal, Gemini2_5FlashPreview0417Options, type Gemini2_5FlashPreview0417OptionsType, Gemini2_5FlashPreview0417Schema, Gemini2_5ProPreview0325, Gemini2_5ProPreview0325Literal, Gemini2_5ProPreview0325Options, type Gemini2_5ProPreview0325OptionsType, Gemini2_5ProPreview0325Schema, GeminiPro, GeminiProLiteral, GeminiProOptions, type GeminiProOptionsType, GeminiProSchema, GeminiProVision, GeminiProVisionLiteral, GeminiProVisionOptions, type GeminiProVisionOptionsType, GeminiProVisionSchema, 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, GoogleChatSafetySettings, type GoogleChatSafetySettingsType, 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, reasoningEnabled, safetySettings, seed, stop, temperature, toolChoice, topK, topP };
3435
+ export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, ChatModelReasoningConfigDef, ChatModelReasoningConfigSchema, EmbeddingModelBaseConfigDef, EmbeddingModelBaseConfigSchema, 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, Gemini2_0FlashExp, Gemini2_0FlashExpLiteral, Gemini2_0FlashExpOptions, type Gemini2_0FlashExpOptionsType, Gemini2_0FlashExpSchema, Gemini2_5FlashPreview0417, Gemini2_5FlashPreview0417Literal, Gemini2_5FlashPreview0417Options, type Gemini2_5FlashPreview0417OptionsType, Gemini2_5FlashPreview0417Schema, Gemini2_5ProPreview0325, Gemini2_5ProPreview0325Literal, Gemini2_5ProPreview0325Options, type Gemini2_5ProPreview0325OptionsType, Gemini2_5ProPreview0325Schema, Google, GoogleChatAssistantRoleLiteral, GoogleChatContent, GoogleChatContentPartFunctionCall, type GoogleChatContentPartFunctionCallType, GoogleChatContentPartFunctionResponse, type GoogleChatContentPartFunctionResponseType, GoogleChatContentPartInlineData, type GoogleChatContentPartInlineDataType, GoogleChatContentPartText, type GoogleChatContentPartTextType, type GoogleChatContentType, GoogleChatGenerationConfig, type GoogleChatGenerationConfigType, GoogleChatModelConfigs, GoogleChatModelModalities, GoogleChatModelModalitiesEnum, GoogleChatModelResponseSchemaConfigDef, GoogleChatModelResponseSchemaConfigSchema, GoogleChatModelRoles, GoogleChatModelRolesMap, GoogleChatModelTextModalities, GoogleChatModelTextModalitiesEnum, GoogleChatModelTextToolModalities, GoogleChatModelTextToolModalitiesEnum, GoogleChatModelTextVisionModalities, GoogleChatModelTextVisionModalitiesEnum, GoogleChatRequest, type GoogleChatRequestType, GoogleChatSafetySettings, type GoogleChatSafetySettingsType, 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, reasoningEnabled, safetySettings, seed, stop, temperature, toolChoice, topK, topP };