@adaline/openai 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -73,7 +73,24 @@ declare const OpenAIChatModelConfigs: {
73
73
  step: number;
74
74
  default: number;
75
75
  };
76
- readonly responseFormat: {
76
+ readonly logProbs: {
77
+ type: "select-boolean";
78
+ param: string;
79
+ title: string;
80
+ description: string;
81
+ default: boolean | null;
82
+ };
83
+ readonly topLogProbs: {
84
+ type: "range";
85
+ param: string;
86
+ title: string;
87
+ description: string;
88
+ max: number;
89
+ min: number;
90
+ step: number;
91
+ default: number;
92
+ };
93
+ readonly toolChoice: {
77
94
  type: "select-string";
78
95
  param: string;
79
96
  title: string;
@@ -81,14 +98,127 @@ declare const OpenAIChatModelConfigs: {
81
98
  default: string;
82
99
  choices: string[];
83
100
  };
84
- readonly logProbs: {
101
+ };
102
+ schema: zod.ZodObject<{
103
+ temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
104
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
105
+ stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
106
+ topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
107
+ frequencyPenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
108
+ presencePenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
109
+ seed: zod.ZodEffects<zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>, number | undefined, number | undefined>;
110
+ logProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
111
+ topLogProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
112
+ toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
113
+ }, "strip", zod.ZodTypeAny, {
114
+ temperature?: number | undefined;
115
+ seed?: number | undefined;
116
+ stop?: string[] | undefined;
117
+ maxTokens?: number | undefined;
118
+ topP?: number | undefined;
119
+ frequencyPenalty?: number | undefined;
120
+ presencePenalty?: number | undefined;
121
+ logProbs?: boolean | null | undefined;
122
+ topLogProbs?: number | undefined;
123
+ toolChoice?: string | undefined;
124
+ }, {
125
+ temperature?: number | undefined;
126
+ seed?: number | undefined;
127
+ stop?: string[] | undefined;
128
+ maxTokens?: number | undefined;
129
+ topP?: number | undefined;
130
+ frequencyPenalty?: number | undefined;
131
+ presencePenalty?: number | undefined;
132
+ logProbs?: boolean | null | undefined;
133
+ topLogProbs?: number | undefined;
134
+ toolChoice?: string | undefined;
135
+ }>;
136
+ };
137
+ readonly responseFormat: (maxOutputTokens: number, maxSequences: number) => {
138
+ def: {
139
+ responseFormat: {
140
+ type: "select-string";
141
+ param: string;
142
+ title: string;
143
+ description: string;
144
+ default: string;
145
+ choices: string[];
146
+ };
147
+ temperature: {
148
+ type: "range";
149
+ param: string;
150
+ title: string;
151
+ description: string;
152
+ max: number;
153
+ min: number;
154
+ step: number;
155
+ default: number;
156
+ };
157
+ maxTokens: {
158
+ type: "range";
159
+ param: string;
160
+ title: string;
161
+ description: string;
162
+ max: number;
163
+ min: number;
164
+ step: number;
165
+ default: number;
166
+ };
167
+ stop: {
168
+ type: "multi-string";
169
+ param: string;
170
+ title: string;
171
+ description: string;
172
+ max: number;
173
+ };
174
+ topP: {
175
+ type: "range";
176
+ param: string;
177
+ title: string;
178
+ description: string;
179
+ max: number;
180
+ min: number;
181
+ step: number;
182
+ default: number;
183
+ };
184
+ frequencyPenalty: {
185
+ type: "range";
186
+ param: string;
187
+ title: string;
188
+ description: string;
189
+ max: number;
190
+ min: number;
191
+ step: number;
192
+ default: number;
193
+ };
194
+ presencePenalty: {
195
+ type: "range";
196
+ param: string;
197
+ title: string;
198
+ description: string;
199
+ max: number;
200
+ min: number;
201
+ step: number;
202
+ default: number;
203
+ };
204
+ seed: {
205
+ type: "range";
206
+ param: string;
207
+ title: string;
208
+ description: string;
209
+ max: number;
210
+ min: number;
211
+ step: number;
212
+ default: number;
213
+ };
214
+ logProbs: {
85
215
  type: "select-boolean";
86
216
  param: string;
87
217
  title: string;
88
218
  description: string;
89
219
  default: boolean | null;
90
220
  };
91
- readonly topLogProbs: {
221
+ topLogProbs: {
92
222
  type: "range";
93
223
  param: string;
94
224
  title: string;
@@ -98,7 +228,7 @@ declare const OpenAIChatModelConfigs: {
98
228
  step: number;
99
229
  default: number;
100
230
  };
101
- readonly toolChoice: {
231
+ toolChoice: {
102
232
  type: "select-string";
103
233
  param: string;
104
234
  title: string;
@@ -107,7 +237,7 @@ declare const OpenAIChatModelConfigs: {
107
237
  choices: string[];
108
238
  };
109
239
  };
110
- schema: zod.ZodObject<{
240
+ schema: zod.ZodObject<zod.objectUtil.extendShape<{
111
241
  temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
112
242
  maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
113
243
  stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
@@ -117,9 +247,10 @@ declare const OpenAIChatModelConfigs: {
117
247
  seed: zod.ZodEffects<zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>, number | undefined, number | undefined>;
118
248
  logProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
119
249
  topLogProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
120
- responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
121
250
  toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
122
- }, "strip", zod.ZodTypeAny, {
251
+ }, {
252
+ responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
253
+ }>, "strip", zod.ZodTypeAny, {
123
254
  temperature?: number | undefined;
124
255
  seed?: number | undefined;
125
256
  stop?: string[] | undefined;
@@ -129,8 +260,8 @@ declare const OpenAIChatModelConfigs: {
129
260
  presencePenalty?: number | undefined;
130
261
  logProbs?: boolean | null | undefined;
131
262
  topLogProbs?: number | undefined;
132
- responseFormat?: string | undefined;
133
263
  toolChoice?: string | undefined;
264
+ responseFormat?: string | undefined;
134
265
  }, {
135
266
  temperature?: number | undefined;
136
267
  seed?: number | undefined;
@@ -141,8 +272,8 @@ declare const OpenAIChatModelConfigs: {
141
272
  presencePenalty?: number | undefined;
142
273
  logProbs?: boolean | null | undefined;
143
274
  topLogProbs?: number | undefined;
144
- responseFormat?: string | undefined;
145
275
  toolChoice?: string | undefined;
276
+ responseFormat?: string | undefined;
146
277
  }>;
147
278
  };
148
279
  readonly responseSchema: (maxOutputTokens: number, maxSequences: number) => {
@@ -265,7 +396,6 @@ declare const OpenAIChatModelConfigs: {
265
396
  seed: zod.ZodEffects<zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>, number | undefined, number | undefined>;
266
397
  logProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
267
398
  topLogProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
268
- responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
269
399
  toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
270
400
  }, {
271
401
  responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
@@ -287,8 +417,8 @@ declare const OpenAIChatModelConfigs: {
287
417
  presencePenalty?: number | undefined;
288
418
  logProbs?: boolean | null | undefined;
289
419
  topLogProbs?: number | undefined;
290
- responseFormat?: string | undefined;
291
420
  toolChoice?: string | undefined;
421
+ responseFormat?: string | undefined;
292
422
  }, {
293
423
  responseSchema: {
294
424
  [x: string]: any;
@@ -302,15 +432,23 @@ declare const OpenAIChatModelConfigs: {
302
432
  presencePenalty?: number | undefined;
303
433
  logProbs?: boolean | null | undefined;
304
434
  topLogProbs?: number | undefined;
305
- responseFormat?: string | undefined;
306
435
  toolChoice?: string | undefined;
436
+ responseFormat?: string | undefined;
307
437
  }>;
308
438
  };
309
- };
310
- declare const OpenAIEmbeddingModelConfigs: {
311
- readonly base: () => {
439
+ readonly oSeries: (maxOutputTokens: number, maxSequences: number) => {
312
440
  def: {
313
- readonly encodingFormat: {
441
+ maxTokens: {
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
+ responseFormat: {
314
452
  type: "select-string";
315
453
  param: string;
316
454
  title: string;
@@ -318,7 +456,78 @@ declare const OpenAIEmbeddingModelConfigs: {
318
456
  default: string;
319
457
  choices: string[];
320
458
  };
321
- readonly dimensions: {
459
+ responseSchema: {
460
+ type: "object-schema";
461
+ param: string;
462
+ title: string;
463
+ description: string;
464
+ objectSchema?: any;
465
+ };
466
+ temperature: {
467
+ type: "range";
468
+ param: string;
469
+ title: string;
470
+ description: string;
471
+ max: number;
472
+ min: number;
473
+ step: number;
474
+ default: number;
475
+ };
476
+ stop: {
477
+ type: "multi-string";
478
+ param: string;
479
+ title: string;
480
+ description: string;
481
+ max: number;
482
+ };
483
+ topP: {
484
+ type: "range";
485
+ param: string;
486
+ title: string;
487
+ description: string;
488
+ max: number;
489
+ min: number;
490
+ step: number;
491
+ default: number;
492
+ };
493
+ frequencyPenalty: {
494
+ type: "range";
495
+ param: string;
496
+ title: string;
497
+ description: string;
498
+ max: number;
499
+ min: number;
500
+ step: number;
501
+ default: number;
502
+ };
503
+ presencePenalty: {
504
+ type: "range";
505
+ param: string;
506
+ title: string;
507
+ description: string;
508
+ max: number;
509
+ min: number;
510
+ step: number;
511
+ default: number;
512
+ };
513
+ seed: {
514
+ type: "range";
515
+ param: string;
516
+ title: string;
517
+ description: string;
518
+ max: number;
519
+ min: number;
520
+ step: number;
521
+ default: number;
522
+ };
523
+ logProbs: {
524
+ type: "select-boolean";
525
+ param: string;
526
+ title: string;
527
+ description: string;
528
+ default: boolean | null;
529
+ };
530
+ topLogProbs: {
322
531
  type: "range";
323
532
  param: string;
324
533
  title: string;
@@ -328,15 +537,118 @@ declare const OpenAIEmbeddingModelConfigs: {
328
537
  step: number;
329
538
  default: number;
330
539
  };
540
+ toolChoice: {
541
+ type: "select-string";
542
+ param: string;
543
+ title: string;
544
+ description: string;
545
+ default: string;
546
+ choices: string[];
547
+ };
331
548
  };
332
- schema: zod.ZodObject<{
333
- encodingFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
334
- dimensions: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
335
- }, "strip", zod.ZodTypeAny, {
336
- dimensions?: number | undefined;
337
- encodingFormat?: string | undefined;
338
- }, {
339
- dimensions?: number | undefined;
549
+ schema: zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
550
+ temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
551
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
552
+ stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
553
+ topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
554
+ frequencyPenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
555
+ presencePenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
556
+ seed: zod.ZodEffects<zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>, number | undefined, number | undefined>;
557
+ logProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
558
+ topLogProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
559
+ toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
560
+ }, {
561
+ responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
562
+ responseSchema: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
563
+ [x: string]: any;
564
+ }, {
565
+ [x: string]: any;
566
+ }>;
567
+ }>, {
568
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
569
+ }>, "strip", zod.ZodTypeAny, {
570
+ responseSchema: {
571
+ [x: string]: any;
572
+ };
573
+ temperature?: number | undefined;
574
+ seed?: number | undefined;
575
+ stop?: string[] | undefined;
576
+ maxTokens?: number | undefined;
577
+ topP?: number | undefined;
578
+ frequencyPenalty?: number | undefined;
579
+ presencePenalty?: number | undefined;
580
+ logProbs?: boolean | null | undefined;
581
+ topLogProbs?: number | undefined;
582
+ toolChoice?: string | undefined;
583
+ responseFormat?: string | undefined;
584
+ }, {
585
+ responseSchema: {
586
+ [x: string]: any;
587
+ };
588
+ temperature?: number | undefined;
589
+ seed?: number | undefined;
590
+ stop?: string[] | undefined;
591
+ maxTokens?: number | undefined;
592
+ topP?: number | undefined;
593
+ frequencyPenalty?: number | undefined;
594
+ presencePenalty?: number | undefined;
595
+ logProbs?: boolean | null | undefined;
596
+ topLogProbs?: number | undefined;
597
+ toolChoice?: string | undefined;
598
+ responseFormat?: string | undefined;
599
+ }>;
600
+ };
601
+ };
602
+ declare const OpenAIEmbeddingModelConfigs: {
603
+ readonly base: () => {
604
+ def: {
605
+ readonly encodingFormat: {
606
+ type: "select-string";
607
+ param: string;
608
+ title: string;
609
+ description: string;
610
+ default: string;
611
+ choices: string[];
612
+ };
613
+ };
614
+ schema: zod.ZodObject<{
615
+ encodingFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
616
+ }, "strip", zod.ZodTypeAny, {
617
+ encodingFormat?: string | undefined;
618
+ }, {
619
+ encodingFormat?: string | undefined;
620
+ }>;
621
+ };
622
+ readonly dimensions: (maxDimensions: number) => {
623
+ def: {
624
+ readonly dimensions: {
625
+ type: "range";
626
+ param: string;
627
+ title: string;
628
+ description: string;
629
+ max: number;
630
+ min: number;
631
+ step: number;
632
+ default: number;
633
+ };
634
+ readonly encodingFormat: {
635
+ type: "select-string";
636
+ param: string;
637
+ title: string;
638
+ description: string;
639
+ default: string;
640
+ choices: string[];
641
+ };
642
+ };
643
+ schema: zod.ZodObject<zod.objectUtil.extendShape<{
644
+ encodingFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
645
+ }, {
646
+ dimensions: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
647
+ }>, "strip", zod.ZodTypeAny, {
648
+ dimensions?: number | undefined;
649
+ encodingFormat?: string | undefined;
650
+ }, {
651
+ dimensions?: number | undefined;
340
652
  encodingFormat?: string | undefined;
341
653
  }>;
342
654
  };
@@ -352,7 +664,6 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
352
664
  seed: z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodNumber>>, number | undefined, number | undefined>;
353
665
  logProbs: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
354
666
  topLogProbs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
355
- responseFormat: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
356
667
  toolChoice: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
357
668
  }, "strip", z.ZodTypeAny, {
358
669
  temperature?: number | undefined;
@@ -364,7 +675,6 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
364
675
  presencePenalty?: number | undefined;
365
676
  logProbs?: boolean | null | undefined;
366
677
  topLogProbs?: number | undefined;
367
- responseFormat?: string | undefined;
368
678
  toolChoice?: string | undefined;
369
679
  }, {
370
680
  temperature?: number | undefined;
@@ -376,7 +686,6 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
376
686
  presencePenalty?: number | undefined;
377
687
  logProbs?: boolean | null | undefined;
378
688
  topLogProbs?: number | undefined;
379
- responseFormat?: string | undefined;
380
689
  toolChoice?: string | undefined;
381
690
  }>;
382
691
  declare const ChatModelBaseConfigDef: (maxOutputTokens: number, maxSequences: number) => {
@@ -447,14 +756,6 @@ declare const ChatModelBaseConfigDef: (maxOutputTokens: number, maxSequences: nu
447
756
  step: number;
448
757
  default: number;
449
758
  };
450
- readonly responseFormat: {
451
- type: "select-string";
452
- param: string;
453
- title: string;
454
- description: string;
455
- default: string;
456
- choices: string[];
457
- };
458
759
  readonly logProbs: {
459
760
  type: "select-boolean";
460
761
  param: string;
@@ -593,7 +894,7 @@ declare const topLogProbs: {
593
894
  };
594
895
  schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
595
896
  };
596
- declare const responseFormat: {
897
+ declare const toolChoice: {
597
898
  def: {
598
899
  type: "select-string";
599
900
  param: string;
@@ -604,8 +905,101 @@ declare const responseFormat: {
604
905
  };
605
906
  schema: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
606
907
  };
607
- declare const toolChoice: {
608
- def: {
908
+
909
+ declare const ChatModelResponseFormatConfigDef: (maxOutputTokens: number, maxSequences: number) => {
910
+ responseFormat: {
911
+ type: "select-string";
912
+ param: string;
913
+ title: string;
914
+ description: string;
915
+ default: string;
916
+ choices: string[];
917
+ };
918
+ temperature: {
919
+ type: "range";
920
+ param: string;
921
+ title: string;
922
+ description: string;
923
+ max: number;
924
+ min: number;
925
+ step: number;
926
+ default: number;
927
+ };
928
+ maxTokens: {
929
+ type: "range";
930
+ param: string;
931
+ title: string;
932
+ description: string;
933
+ max: number;
934
+ min: number;
935
+ step: number;
936
+ default: number;
937
+ };
938
+ stop: {
939
+ type: "multi-string";
940
+ param: string;
941
+ title: string;
942
+ description: string;
943
+ max: number;
944
+ };
945
+ topP: {
946
+ type: "range";
947
+ param: string;
948
+ title: string;
949
+ description: string;
950
+ max: number;
951
+ min: number;
952
+ step: number;
953
+ default: number;
954
+ };
955
+ frequencyPenalty: {
956
+ type: "range";
957
+ param: string;
958
+ title: string;
959
+ description: string;
960
+ max: number;
961
+ min: number;
962
+ step: number;
963
+ default: number;
964
+ };
965
+ presencePenalty: {
966
+ type: "range";
967
+ param: string;
968
+ title: string;
969
+ description: string;
970
+ max: number;
971
+ min: number;
972
+ step: number;
973
+ default: number;
974
+ };
975
+ seed: {
976
+ type: "range";
977
+ param: string;
978
+ title: string;
979
+ description: string;
980
+ max: number;
981
+ min: number;
982
+ step: number;
983
+ default: number;
984
+ };
985
+ logProbs: {
986
+ type: "select-boolean";
987
+ param: string;
988
+ title: string;
989
+ description: string;
990
+ default: boolean | null;
991
+ };
992
+ topLogProbs: {
993
+ type: "range";
994
+ param: string;
995
+ title: string;
996
+ description: string;
997
+ max: number;
998
+ min: number;
999
+ step: number;
1000
+ default: number;
1001
+ };
1002
+ toolChoice: {
609
1003
  type: "select-string";
610
1004
  param: string;
611
1005
  title: string;
@@ -613,8 +1007,45 @@ declare const toolChoice: {
613
1007
  default: string;
614
1008
  choices: string[];
615
1009
  };
616
- schema: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
617
1010
  };
1011
+ declare const ChatModelResponseFormatConfigSchema: (maxOutputTokens: number, maxSequences: number) => zod.ZodObject<zod.objectUtil.extendShape<{
1012
+ temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1013
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1014
+ stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
1015
+ topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1016
+ frequencyPenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1017
+ presencePenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1018
+ seed: zod.ZodEffects<zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>, number | undefined, number | undefined>;
1019
+ logProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
1020
+ topLogProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1021
+ toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
1022
+ }, {
1023
+ responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
1024
+ }>, "strip", zod.ZodTypeAny, {
1025
+ temperature?: number | undefined;
1026
+ seed?: number | undefined;
1027
+ stop?: string[] | undefined;
1028
+ maxTokens?: number | undefined;
1029
+ topP?: number | undefined;
1030
+ frequencyPenalty?: number | undefined;
1031
+ presencePenalty?: number | undefined;
1032
+ logProbs?: boolean | null | undefined;
1033
+ topLogProbs?: number | undefined;
1034
+ toolChoice?: string | undefined;
1035
+ responseFormat?: string | undefined;
1036
+ }, {
1037
+ temperature?: number | undefined;
1038
+ seed?: number | undefined;
1039
+ stop?: string[] | undefined;
1040
+ maxTokens?: number | undefined;
1041
+ topP?: number | undefined;
1042
+ frequencyPenalty?: number | undefined;
1043
+ presencePenalty?: number | undefined;
1044
+ logProbs?: boolean | null | undefined;
1045
+ topLogProbs?: number | undefined;
1046
+ toolChoice?: string | undefined;
1047
+ responseFormat?: string | undefined;
1048
+ }>;
618
1049
 
619
1050
  declare const ChatModelResponseSchemaConfigDef: (maxOutputTokens: number, maxSequences: number) => {
620
1051
  responseFormat: {
@@ -735,7 +1166,6 @@ declare const ChatModelResponseSchemaConfigSchema: (maxOutputTokens: number, max
735
1166
  seed: z.ZodEffects<z.ZodOptional<z.ZodDefault<z.ZodNumber>>, number | undefined, number | undefined>;
736
1167
  logProbs: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
737
1168
  topLogProbs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
738
- responseFormat: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
739
1169
  toolChoice: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
740
1170
  }, {
741
1171
  responseFormat: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
@@ -757,8 +1187,8 @@ declare const ChatModelResponseSchemaConfigSchema: (maxOutputTokens: number, max
757
1187
  presencePenalty?: number | undefined;
758
1188
  logProbs?: boolean | null | undefined;
759
1189
  topLogProbs?: number | undefined;
760
- responseFormat?: string | undefined;
761
1190
  toolChoice?: string | undefined;
1191
+ responseFormat?: string | undefined;
762
1192
  }, {
763
1193
  responseSchema: {
764
1194
  [x: string]: any;
@@ -772,30 +1202,101 @@ declare const ChatModelResponseSchemaConfigSchema: (maxOutputTokens: number, max
772
1202
  presencePenalty?: number | undefined;
773
1203
  logProbs?: boolean | null | undefined;
774
1204
  topLogProbs?: number | undefined;
775
- responseFormat?: string | undefined;
776
1205
  toolChoice?: string | undefined;
1206
+ responseFormat?: string | undefined;
777
1207
  }>;
778
1208
 
779
- declare const EmbeddingModelBaseConfigSchema: () => z.ZodObject<{
780
- encodingFormat: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
781
- dimensions: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
782
- }, "strip", z.ZodTypeAny, {
783
- dimensions?: number | undefined;
784
- encodingFormat?: string | undefined;
785
- }, {
786
- dimensions?: number | undefined;
787
- encodingFormat?: string | undefined;
788
- }>;
789
- declare const EmbeddingModelBaseConfigDef: () => {
790
- readonly encodingFormat: {
791
- type: "select-string";
1209
+ declare const ChatModelOSeriesConfigDef: (maxOutputTokens: number, maxSequences: number) => {
1210
+ maxTokens: {
1211
+ type: "range";
792
1212
  param: string;
793
1213
  title: string;
794
1214
  description: string;
795
- default: string;
796
- choices: string[];
797
- };
798
- readonly dimensions: {
1215
+ max: number;
1216
+ min: number;
1217
+ step: number;
1218
+ default: number;
1219
+ };
1220
+ responseFormat: {
1221
+ type: "select-string";
1222
+ param: string;
1223
+ title: string;
1224
+ description: string;
1225
+ default: string;
1226
+ choices: string[];
1227
+ };
1228
+ responseSchema: {
1229
+ type: "object-schema";
1230
+ param: string;
1231
+ title: string;
1232
+ description: string;
1233
+ objectSchema?: any;
1234
+ };
1235
+ temperature: {
1236
+ type: "range";
1237
+ param: string;
1238
+ title: string;
1239
+ description: string;
1240
+ max: number;
1241
+ min: number;
1242
+ step: number;
1243
+ default: number;
1244
+ };
1245
+ stop: {
1246
+ type: "multi-string";
1247
+ param: string;
1248
+ title: string;
1249
+ description: string;
1250
+ max: number;
1251
+ };
1252
+ topP: {
1253
+ type: "range";
1254
+ param: string;
1255
+ title: string;
1256
+ description: string;
1257
+ max: number;
1258
+ min: number;
1259
+ step: number;
1260
+ default: number;
1261
+ };
1262
+ frequencyPenalty: {
1263
+ type: "range";
1264
+ param: string;
1265
+ title: string;
1266
+ description: string;
1267
+ max: number;
1268
+ min: number;
1269
+ step: number;
1270
+ default: number;
1271
+ };
1272
+ presencePenalty: {
1273
+ type: "range";
1274
+ param: string;
1275
+ title: string;
1276
+ description: string;
1277
+ max: number;
1278
+ min: number;
1279
+ step: number;
1280
+ default: number;
1281
+ };
1282
+ seed: {
1283
+ type: "range";
1284
+ param: string;
1285
+ title: string;
1286
+ description: string;
1287
+ max: number;
1288
+ min: number;
1289
+ step: number;
1290
+ default: number;
1291
+ };
1292
+ logProbs: {
1293
+ type: "select-boolean";
1294
+ param: string;
1295
+ title: string;
1296
+ description: string;
1297
+ default: boolean | null;
1298
+ };
1299
+ topLogProbs: {
799
1300
  type: "range";
800
1301
  param: string;
801
1302
  title: string;
@@ -805,6 +1306,83 @@ declare const EmbeddingModelBaseConfigDef: () => {
805
1306
  step: number;
806
1307
  default: number;
807
1308
  };
1309
+ toolChoice: {
1310
+ type: "select-string";
1311
+ param: string;
1312
+ title: string;
1313
+ description: string;
1314
+ default: string;
1315
+ choices: string[];
1316
+ };
1317
+ };
1318
+ declare const ChatModelOSeriesConfigSchema: (maxOutputTokens: number, maxSequences: number) => zod.ZodObject<zod.objectUtil.extendShape<zod.objectUtil.extendShape<{
1319
+ temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1320
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1321
+ stop: zod.ZodOptional<zod.ZodDefault<zod.ZodArray<zod.ZodString, "many">>>;
1322
+ topP: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1323
+ frequencyPenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1324
+ presencePenalty: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1325
+ seed: zod.ZodEffects<zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>, number | undefined, number | undefined>;
1326
+ logProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
1327
+ topLogProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1328
+ toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
1329
+ }, {
1330
+ responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
1331
+ responseSchema: zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
1332
+ [x: string]: any;
1333
+ }, {
1334
+ [x: string]: any;
1335
+ }>;
1336
+ }>, {
1337
+ maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1338
+ }>, "strip", zod.ZodTypeAny, {
1339
+ responseSchema: {
1340
+ [x: string]: any;
1341
+ };
1342
+ temperature?: number | undefined;
1343
+ seed?: number | undefined;
1344
+ stop?: string[] | undefined;
1345
+ maxTokens?: number | undefined;
1346
+ topP?: number | undefined;
1347
+ frequencyPenalty?: number | undefined;
1348
+ presencePenalty?: number | undefined;
1349
+ logProbs?: boolean | null | undefined;
1350
+ topLogProbs?: number | undefined;
1351
+ toolChoice?: string | undefined;
1352
+ responseFormat?: string | undefined;
1353
+ }, {
1354
+ responseSchema: {
1355
+ [x: string]: any;
1356
+ };
1357
+ temperature?: number | undefined;
1358
+ seed?: number | undefined;
1359
+ stop?: string[] | undefined;
1360
+ maxTokens?: number | undefined;
1361
+ topP?: number | undefined;
1362
+ frequencyPenalty?: number | undefined;
1363
+ presencePenalty?: number | undefined;
1364
+ logProbs?: boolean | null | undefined;
1365
+ topLogProbs?: number | undefined;
1366
+ toolChoice?: string | undefined;
1367
+ responseFormat?: string | undefined;
1368
+ }>;
1369
+
1370
+ declare const EmbeddingModelBaseConfigSchema: () => z.ZodObject<{
1371
+ encodingFormat: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
1372
+ }, "strip", z.ZodTypeAny, {
1373
+ encodingFormat?: string | undefined;
1374
+ }, {
1375
+ encodingFormat?: string | undefined;
1376
+ }>;
1377
+ declare const EmbeddingModelBaseConfigDef: () => {
1378
+ readonly encodingFormat: {
1379
+ type: "select-string";
1380
+ param: string;
1381
+ title: string;
1382
+ description: string;
1383
+ default: string;
1384
+ choices: string[];
1385
+ };
808
1386
  };
809
1387
 
810
1388
  declare const encodingFormat: {
@@ -818,7 +1396,7 @@ declare const encodingFormat: {
818
1396
  };
819
1397
  schema: zod.ZodOptional<zod.ZodDefault<zod.ZodEnum<[string, ...string[]]>>>;
820
1398
  };
821
- declare const dimensions: {
1399
+ declare const dimensions: (maxDimensions: number) => {
822
1400
  def: {
823
1401
  type: "range";
824
1402
  param: string;
@@ -832,6 +1410,38 @@ declare const dimensions: {
832
1410
  schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
833
1411
  };
834
1412
 
1413
+ declare const EmbeddingModelDimensionsConfigSchema: (maxDimensions: number) => z.ZodObject<z.objectUtil.extendShape<{
1414
+ encodingFormat: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
1415
+ }, {
1416
+ dimensions: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1417
+ }>, "strip", z.ZodTypeAny, {
1418
+ dimensions?: number | undefined;
1419
+ encodingFormat?: string | undefined;
1420
+ }, {
1421
+ dimensions?: number | undefined;
1422
+ encodingFormat?: string | undefined;
1423
+ }>;
1424
+ declare const EmbeddingModelDimensionsConfigDef: (maxDimensions: number) => {
1425
+ readonly dimensions: {
1426
+ type: "range";
1427
+ param: string;
1428
+ title: string;
1429
+ description: string;
1430
+ max: number;
1431
+ min: number;
1432
+ step: number;
1433
+ default: number;
1434
+ };
1435
+ readonly encodingFormat: {
1436
+ type: "select-string";
1437
+ param: string;
1438
+ title: string;
1439
+ description: string;
1440
+ default: string;
1441
+ choices: string[];
1442
+ };
1443
+ };
1444
+
835
1445
  declare const OpenAIChatModelRoles: z.ZodEnum<["system", "user", "assistant", "tool"]>;
836
1446
  declare const OpenAIChatModelRolesMap: {
837
1447
  readonly system: "system";
@@ -842,6 +1452,8 @@ declare const OpenAIChatModelRolesMap: {
842
1452
 
843
1453
  declare const OpenAIChatModelModalities: ChatModelSchemaType["modalities"];
844
1454
  declare const OpenAIChatModelModalitiesEnum: z.ZodEnum<["text", "image", "tool-call", "tool-response"]>;
1455
+ declare const OpenAIChatModelTextToolModalities: ChatModelSchemaType["modalities"];
1456
+ declare const OpenAIChatModelTextToolModalitiesEnum: z.ZodEnum<["text", "tool-call", "tool-response"]>;
845
1457
 
846
1458
  declare const OpenAIToolCallsCompleteChatResponse: z.ZodArray<z.ZodObject<{
847
1459
  id: z.ZodString;
@@ -876,7 +1488,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
876
1488
  object: z.ZodLiteral<"chat.completion">;
877
1489
  created: z.ZodNumber;
878
1490
  model: z.ZodString;
879
- system_fingerprint: z.ZodString;
1491
+ system_fingerprint: z.ZodNullable<z.ZodString>;
880
1492
  choices: z.ZodArray<z.ZodObject<{
881
1493
  index: z.ZodNumber;
882
1494
  message: z.ZodObject<{
@@ -936,7 +1548,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
936
1548
  id: string;
937
1549
  }[] | undefined;
938
1550
  }>;
939
- logprobs: z.ZodNullable<z.ZodObject<{
1551
+ logprobs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
940
1552
  content: z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
941
1553
  token: z.ZodString;
942
1554
  logprob: z.ZodNumber;
@@ -1053,10 +1665,25 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1053
1665
  logprob: number;
1054
1666
  bytes: number[] | null;
1055
1667
  }[] | null;
1056
- }>>;
1668
+ }>>>;
1057
1669
  finish_reason: z.ZodString;
1058
1670
  }, "strip", z.ZodTypeAny, {
1059
- logprobs: {
1671
+ message: {
1672
+ role: string;
1673
+ content?: string | null | undefined;
1674
+ refusal?: string | null | undefined;
1675
+ tool_calls?: {
1676
+ function: {
1677
+ name: string;
1678
+ arguments: string;
1679
+ };
1680
+ type: "function";
1681
+ id: string;
1682
+ }[] | undefined;
1683
+ };
1684
+ index: number;
1685
+ finish_reason: string;
1686
+ logprobs?: {
1060
1687
  content: {
1061
1688
  top_logprobs: {
1062
1689
  token: string;
@@ -1077,7 +1704,8 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1077
1704
  logprob: number;
1078
1705
  bytes: number[] | null;
1079
1706
  }[] | null;
1080
- } | null;
1707
+ } | null | undefined;
1708
+ }, {
1081
1709
  message: {
1082
1710
  role: string;
1083
1711
  content?: string | null | undefined;
@@ -1093,8 +1721,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1093
1721
  };
1094
1722
  index: number;
1095
1723
  finish_reason: string;
1096
- }, {
1097
- logprobs: {
1724
+ logprobs?: {
1098
1725
  content: {
1099
1726
  top_logprobs: {
1100
1727
  token: string;
@@ -1115,22 +1742,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1115
1742
  logprob: number;
1116
1743
  bytes: number[] | null;
1117
1744
  }[] | null;
1118
- } | null;
1119
- message: {
1120
- role: string;
1121
- content?: string | null | undefined;
1122
- refusal?: string | null | undefined;
1123
- tool_calls?: {
1124
- function: {
1125
- name: string;
1126
- arguments: string;
1127
- };
1128
- type: "function";
1129
- id: string;
1130
- }[] | undefined;
1131
- };
1132
- index: number;
1133
- finish_reason: string;
1745
+ } | null | undefined;
1134
1746
  }>, "many">;
1135
1747
  usage: z.ZodObject<{
1136
1748
  prompt_tokens: z.ZodNumber;
@@ -1148,28 +1760,6 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1148
1760
  }, "strip", z.ZodTypeAny, {
1149
1761
  object: "chat.completion";
1150
1762
  choices: {
1151
- logprobs: {
1152
- content: {
1153
- top_logprobs: {
1154
- token: string;
1155
- logprob: number;
1156
- bytes: number[] | null;
1157
- }[];
1158
- token: string;
1159
- logprob: number;
1160
- bytes: number[] | null;
1161
- }[] | null;
1162
- refusal: {
1163
- top_logprobs: {
1164
- token: string;
1165
- logprob: number;
1166
- bytes: number[] | null;
1167
- }[];
1168
- token: string;
1169
- logprob: number;
1170
- bytes: number[] | null;
1171
- }[] | null;
1172
- } | null;
1173
1763
  message: {
1174
1764
  role: string;
1175
1765
  content?: string | null | undefined;
@@ -1185,20 +1775,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1185
1775
  };
1186
1776
  index: number;
1187
1777
  finish_reason: string;
1188
- }[];
1189
- id: string;
1190
- created: number;
1191
- model: string;
1192
- system_fingerprint: string;
1193
- usage: {
1194
- prompt_tokens: number;
1195
- completion_tokens: number;
1196
- total_tokens: number;
1197
- };
1198
- }, {
1199
- object: "chat.completion";
1200
- choices: {
1201
- logprobs: {
1778
+ logprobs?: {
1202
1779
  content: {
1203
1780
  top_logprobs: {
1204
1781
  token: string;
@@ -1219,10 +1796,23 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1219
1796
  logprob: number;
1220
1797
  bytes: number[] | null;
1221
1798
  }[] | null;
1222
- } | null;
1223
- message: {
1224
- role: string;
1225
- content?: string | null | undefined;
1799
+ } | null | undefined;
1800
+ }[];
1801
+ id: string;
1802
+ created: number;
1803
+ model: string;
1804
+ system_fingerprint: string | null;
1805
+ usage: {
1806
+ prompt_tokens: number;
1807
+ completion_tokens: number;
1808
+ total_tokens: number;
1809
+ };
1810
+ }, {
1811
+ object: "chat.completion";
1812
+ choices: {
1813
+ message: {
1814
+ role: string;
1815
+ content?: string | null | undefined;
1226
1816
  refusal?: string | null | undefined;
1227
1817
  tool_calls?: {
1228
1818
  function: {
@@ -1235,11 +1825,33 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1235
1825
  };
1236
1826
  index: number;
1237
1827
  finish_reason: string;
1828
+ logprobs?: {
1829
+ content: {
1830
+ top_logprobs: {
1831
+ token: string;
1832
+ logprob: number;
1833
+ bytes: number[] | null;
1834
+ }[];
1835
+ token: string;
1836
+ logprob: number;
1837
+ bytes: number[] | null;
1838
+ }[] | null;
1839
+ refusal: {
1840
+ top_logprobs: {
1841
+ token: string;
1842
+ logprob: number;
1843
+ bytes: number[] | null;
1844
+ }[];
1845
+ token: string;
1846
+ logprob: number;
1847
+ bytes: number[] | null;
1848
+ }[] | null;
1849
+ } | null | undefined;
1238
1850
  }[];
1239
1851
  id: string;
1240
1852
  created: number;
1241
1853
  model: string;
1242
- system_fingerprint: string;
1854
+ system_fingerprint: string | null;
1243
1855
  usage: {
1244
1856
  prompt_tokens: number;
1245
1857
  completion_tokens: number;
@@ -1912,7 +2524,7 @@ declare const OpenAIChatRequestUserMessage: z.ZodObject<{
1912
2524
  role: "user";
1913
2525
  }>;
1914
2526
  type OpenAIChatRequestUserMessageType = z.infer<typeof OpenAIChatRequestUserMessage>;
1915
- declare const OpenAIChatRequestAssistantMessage: z.ZodEffects<z.ZodObject<{
2527
+ declare const OpenAIChatRequestAssistantMessage: z.ZodObject<{
1916
2528
  role: z.ZodLiteral<"assistant">;
1917
2529
  content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
1918
2530
  text: z.ZodString;
@@ -1980,34 +2592,6 @@ declare const OpenAIChatRequestAssistantMessage: z.ZodEffects<z.ZodObject<{
1980
2592
  type: "function";
1981
2593
  id: string;
1982
2594
  }[] | undefined;
1983
- }>, {
1984
- role: "assistant";
1985
- content?: string | {
1986
- type: "text";
1987
- text: string;
1988
- }[] | undefined;
1989
- tool_calls?: {
1990
- function: {
1991
- name: string;
1992
- arguments: string;
1993
- };
1994
- type: "function";
1995
- id: string;
1996
- }[] | undefined;
1997
- }, {
1998
- role: "assistant";
1999
- content?: string | {
2000
- type: "text";
2001
- text: string;
2002
- }[] | undefined;
2003
- tool_calls?: {
2004
- function: {
2005
- name: string;
2006
- arguments: string;
2007
- };
2008
- type: "function";
2009
- id: string;
2010
- }[] | undefined;
2011
2595
  }>;
2012
2596
  type OpenAIChatRequestAssistantMessageType = z.infer<typeof OpenAIChatRequestAssistantMessage>;
2013
2597
  declare const OpenAIChatRequestToolMessage: z.ZodObject<{
@@ -2108,7 +2692,7 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
2108
2692
  };
2109
2693
  })[];
2110
2694
  role: "user";
2111
- }>, z.ZodEffects<z.ZodObject<{
2695
+ }>, z.ZodObject<{
2112
2696
  role: z.ZodLiteral<"assistant">;
2113
2697
  content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
2114
2698
  text: z.ZodString;
@@ -2176,34 +2760,6 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
2176
2760
  type: "function";
2177
2761
  id: string;
2178
2762
  }[] | undefined;
2179
- }>, {
2180
- role: "assistant";
2181
- content?: string | {
2182
- type: "text";
2183
- text: string;
2184
- }[] | undefined;
2185
- tool_calls?: {
2186
- function: {
2187
- name: string;
2188
- arguments: string;
2189
- };
2190
- type: "function";
2191
- id: string;
2192
- }[] | undefined;
2193
- }, {
2194
- role: "assistant";
2195
- content?: string | {
2196
- type: "text";
2197
- text: string;
2198
- }[] | undefined;
2199
- tool_calls?: {
2200
- function: {
2201
- name: string;
2202
- arguments: string;
2203
- };
2204
- type: "function";
2205
- id: string;
2206
- }[] | undefined;
2207
2763
  }>, z.ZodObject<{
2208
2764
  role: z.ZodLiteral<"tool">;
2209
2765
  tool_call_id: z.ZodString;
@@ -2218,9 +2774,9 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
2218
2774
  tool_call_id: string;
2219
2775
  }>]>;
2220
2776
  type OpenAIChatRequestMessageType = z.infer<typeof OpenAIChatRequestMessage>;
2221
- declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2777
+ declare const OpenAIChatRequest: z.ZodObject<{
2222
2778
  model: z.ZodOptional<z.ZodString>;
2223
- messages: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
2779
+ messages: z.ZodArray<z.ZodUnion<[z.ZodObject<{
2224
2780
  role: z.ZodLiteral<"system">;
2225
2781
  content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
2226
2782
  text: z.ZodString;
@@ -2304,7 +2860,7 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2304
2860
  };
2305
2861
  })[];
2306
2862
  role: "user";
2307
- }>, z.ZodEffects<z.ZodObject<{
2863
+ }>, z.ZodObject<{
2308
2864
  role: z.ZodLiteral<"assistant">;
2309
2865
  content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
2310
2866
  text: z.ZodString;
@@ -2372,34 +2928,6 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2372
2928
  type: "function";
2373
2929
  id: string;
2374
2930
  }[] | undefined;
2375
- }>, {
2376
- role: "assistant";
2377
- content?: string | {
2378
- type: "text";
2379
- text: string;
2380
- }[] | undefined;
2381
- tool_calls?: {
2382
- function: {
2383
- name: string;
2384
- arguments: string;
2385
- };
2386
- type: "function";
2387
- id: string;
2388
- }[] | undefined;
2389
- }, {
2390
- role: "assistant";
2391
- content?: string | {
2392
- type: "text";
2393
- text: string;
2394
- }[] | undefined;
2395
- tool_calls?: {
2396
- function: {
2397
- name: string;
2398
- arguments: string;
2399
- };
2400
- type: "function";
2401
- id: string;
2402
- }[] | undefined;
2403
2931
  }>, z.ZodObject<{
2404
2932
  role: z.ZodLiteral<"tool">;
2405
2933
  tool_call_id: z.ZodString;
@@ -2412,7 +2940,7 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2412
2940
  content: string;
2413
2941
  role: "tool";
2414
2942
  tool_call_id: string;
2415
- }>]>, "many">>;
2943
+ }>]>, "many">;
2416
2944
  frequency_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2417
2945
  logprobs: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2418
2946
  top_logprobs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -2519,34 +3047,7 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2519
3047
  type: "function";
2520
3048
  }>]>>;
2521
3049
  }, "strip", z.ZodTypeAny, {
2522
- temperature?: number | null | undefined;
2523
- top_p?: number | null | undefined;
2524
- frequency_penalty?: number | null | undefined;
2525
- presence_penalty?: number | null | undefined;
2526
- seed?: number | null | undefined;
2527
- logprobs?: boolean | null | undefined;
2528
- top_logprobs?: number | null | undefined;
2529
- response_format?: {
2530
- type: "text" | "json_object";
2531
- } | {
2532
- type: "json_schema";
2533
- json_schema: {
2534
- name: string;
2535
- description?: string | undefined;
2536
- strict?: boolean | undefined;
2537
- schema?: any;
2538
- };
2539
- } | undefined;
2540
- tool_choice?: "auto" | "required" | "none" | {
2541
- function: {
2542
- name: string;
2543
- };
2544
- type: "function";
2545
- } | undefined;
2546
- max_tokens?: number | null | undefined;
2547
- stop?: string | string[] | null | undefined;
2548
- model?: string | undefined;
2549
- messages?: ({
3050
+ messages: ({
2550
3051
  content: string | {
2551
3052
  type: "text";
2552
3053
  text: string;
@@ -2582,17 +3083,7 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2582
3083
  content: string;
2583
3084
  role: "tool";
2584
3085
  tool_call_id: string;
2585
- })[] | undefined;
2586
- tools?: {
2587
- function: {
2588
- name: string;
2589
- description?: string | undefined;
2590
- strict?: boolean | undefined;
2591
- parameters?: any;
2592
- };
2593
- type: "function";
2594
- }[] | undefined;
2595
- }, {
3086
+ })[];
2596
3087
  temperature?: number | null | undefined;
2597
3088
  top_p?: number | null | undefined;
2598
3089
  frequency_penalty?: number | null | undefined;
@@ -2600,6 +3091,14 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2600
3091
  seed?: number | null | undefined;
2601
3092
  logprobs?: boolean | null | undefined;
2602
3093
  top_logprobs?: number | null | undefined;
3094
+ tool_choice?: "auto" | "required" | "none" | {
3095
+ function: {
3096
+ name: string;
3097
+ };
3098
+ type: "function";
3099
+ } | undefined;
3100
+ max_tokens?: number | null | undefined;
3101
+ stop?: string | string[] | null | undefined;
2603
3102
  response_format?: {
2604
3103
  type: "text" | "json_object";
2605
3104
  } | {
@@ -2611,16 +3110,18 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2611
3110
  schema?: any;
2612
3111
  };
2613
3112
  } | undefined;
2614
- tool_choice?: "auto" | "required" | "none" | {
3113
+ model?: string | undefined;
3114
+ tools?: {
2615
3115
  function: {
2616
3116
  name: string;
3117
+ description?: string | undefined;
3118
+ strict?: boolean | undefined;
3119
+ parameters?: any;
2617
3120
  };
2618
3121
  type: "function";
2619
- } | undefined;
2620
- max_tokens?: number | null | undefined;
2621
- stop?: string | string[] | null | undefined;
2622
- model?: string | undefined;
2623
- messages?: ({
3122
+ }[] | undefined;
3123
+ }, {
3124
+ messages: ({
2624
3125
  content: string | {
2625
3126
  type: "text";
2626
3127
  text: string;
@@ -2656,17 +3157,7 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2656
3157
  content: string;
2657
3158
  role: "tool";
2658
3159
  tool_call_id: string;
2659
- })[] | undefined;
2660
- tools?: {
2661
- function: {
2662
- name: string;
2663
- description?: string | undefined;
2664
- strict?: boolean | undefined;
2665
- parameters?: any;
2666
- };
2667
- type: "function";
2668
- }[] | undefined;
2669
- }>, {
3160
+ })[];
2670
3161
  temperature?: number | null | undefined;
2671
3162
  top_p?: number | null | undefined;
2672
3163
  frequency_penalty?: number | null | undefined;
@@ -2674,6 +3165,14 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2674
3165
  seed?: number | null | undefined;
2675
3166
  logprobs?: boolean | null | undefined;
2676
3167
  top_logprobs?: number | null | undefined;
3168
+ tool_choice?: "auto" | "required" | "none" | {
3169
+ function: {
3170
+ name: string;
3171
+ };
3172
+ type: "function";
3173
+ } | undefined;
3174
+ max_tokens?: number | null | undefined;
3175
+ stop?: string | string[] | null | undefined;
2677
3176
  response_format?: {
2678
3177
  type: "text" | "json_object";
2679
3178
  } | {
@@ -2685,72 +3184,224 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2685
3184
  schema?: any;
2686
3185
  };
2687
3186
  } | undefined;
2688
- tool_choice?: "auto" | "required" | "none" | {
3187
+ model?: string | undefined;
3188
+ tools?: {
2689
3189
  function: {
2690
3190
  name: string;
3191
+ description?: string | undefined;
3192
+ strict?: boolean | undefined;
3193
+ parameters?: any;
2691
3194
  };
2692
3195
  type: "function";
2693
- } | undefined;
2694
- max_tokens?: number | null | undefined;
2695
- stop?: string | string[] | null | undefined;
2696
- model?: string | undefined;
2697
- messages?: ({
3196
+ }[] | undefined;
3197
+ }>;
3198
+ type OpenAIChatRequestType = z.infer<typeof OpenAIChatRequest>;
3199
+
3200
+ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omit<{
3201
+ model: z.ZodOptional<z.ZodString>;
3202
+ messages: z.ZodArray<z.ZodUnion<[z.ZodObject<{
3203
+ role: z.ZodLiteral<"system">;
3204
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
3205
+ text: z.ZodString;
3206
+ type: z.ZodLiteral<"text">;
3207
+ }, "strip", z.ZodTypeAny, {
3208
+ type: "text";
3209
+ text: string;
3210
+ }, {
3211
+ type: "text";
3212
+ text: string;
3213
+ }>, "many">]>;
3214
+ }, "strip", z.ZodTypeAny, {
2698
3215
  content: string | {
2699
3216
  type: "text";
2700
3217
  text: string;
2701
3218
  }[];
2702
3219
  role: "system";
2703
- } | {
2704
- content: string | ({
3220
+ }, {
3221
+ content: string | {
2705
3222
  type: "text";
2706
3223
  text: string;
2707
- } | {
2708
- type: "image_url";
2709
- image_url: {
2710
- url: string;
2711
- detail?: "auto" | "low" | "high" | undefined;
2712
- };
2713
- })[];
2714
- role: "user";
2715
- } | {
2716
- role: "assistant";
2717
- content?: string | {
3224
+ }[];
3225
+ role: "system";
3226
+ }>, z.ZodObject<{
3227
+ role: z.ZodLiteral<"user">;
3228
+ content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
3229
+ text: z.ZodString;
3230
+ type: z.ZodLiteral<"text">;
3231
+ }, "strip", z.ZodTypeAny, {
2718
3232
  type: "text";
2719
3233
  text: string;
2720
- }[] | undefined;
2721
- tool_calls?: {
2722
- function: {
2723
- name: string;
2724
- arguments: string;
2725
- };
2726
- type: "function";
3234
+ }, {
3235
+ type: "text";
3236
+ text: string;
3237
+ }>, z.ZodObject<{
3238
+ type: z.ZodLiteral<"image_url">;
3239
+ image_url: z.ZodObject<{
3240
+ url: z.ZodString;
3241
+ detail: z.ZodOptional<z.ZodEnum<["low", "high", "auto"]>>;
3242
+ }, "strip", z.ZodTypeAny, {
3243
+ url: string;
3244
+ detail?: "auto" | "low" | "high" | undefined;
3245
+ }, {
3246
+ url: string;
3247
+ detail?: "auto" | "low" | "high" | undefined;
3248
+ }>;
3249
+ }, "strip", z.ZodTypeAny, {
3250
+ type: "image_url";
3251
+ image_url: {
3252
+ url: string;
3253
+ detail?: "auto" | "low" | "high" | undefined;
3254
+ };
3255
+ }, {
3256
+ type: "image_url";
3257
+ image_url: {
3258
+ url: string;
3259
+ detail?: "auto" | "low" | "high" | undefined;
3260
+ };
3261
+ }>]>, "many">]>;
3262
+ }, "strip", z.ZodTypeAny, {
3263
+ content: string | ({
3264
+ type: "text";
3265
+ text: string;
3266
+ } | {
3267
+ type: "image_url";
3268
+ image_url: {
3269
+ url: string;
3270
+ detail?: "auto" | "low" | "high" | undefined;
3271
+ };
3272
+ })[];
3273
+ role: "user";
3274
+ }, {
3275
+ content: string | ({
3276
+ type: "text";
3277
+ text: string;
3278
+ } | {
3279
+ type: "image_url";
3280
+ image_url: {
3281
+ url: string;
3282
+ detail?: "auto" | "low" | "high" | undefined;
3283
+ };
3284
+ })[];
3285
+ role: "user";
3286
+ }>, z.ZodObject<{
3287
+ role: z.ZodLiteral<"assistant">;
3288
+ content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
3289
+ text: z.ZodString;
3290
+ type: z.ZodLiteral<"text">;
3291
+ }, "strip", z.ZodTypeAny, {
3292
+ type: "text";
3293
+ text: string;
3294
+ }, {
3295
+ type: "text";
3296
+ text: string;
3297
+ }>, "many">]>>;
3298
+ tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
3299
+ id: z.ZodString;
3300
+ type: z.ZodLiteral<"function">;
3301
+ function: z.ZodObject<{
3302
+ name: z.ZodString;
3303
+ arguments: z.ZodString;
3304
+ }, "strip", z.ZodTypeAny, {
3305
+ name: string;
3306
+ arguments: string;
3307
+ }, {
3308
+ name: string;
3309
+ arguments: string;
3310
+ }>;
3311
+ }, "strip", z.ZodTypeAny, {
3312
+ function: {
3313
+ name: string;
3314
+ arguments: string;
3315
+ };
3316
+ type: "function";
3317
+ id: string;
3318
+ }, {
3319
+ function: {
3320
+ name: string;
3321
+ arguments: string;
3322
+ };
3323
+ type: "function";
3324
+ id: string;
3325
+ }>, "many">>;
3326
+ }, "strip", z.ZodTypeAny, {
3327
+ role: "assistant";
3328
+ content?: string | {
3329
+ type: "text";
3330
+ text: string;
3331
+ }[] | undefined;
3332
+ tool_calls?: {
3333
+ function: {
3334
+ name: string;
3335
+ arguments: string;
3336
+ };
3337
+ type: "function";
2727
3338
  id: string;
2728
3339
  }[] | undefined;
2729
- } | {
3340
+ }, {
3341
+ role: "assistant";
3342
+ content?: string | {
3343
+ type: "text";
3344
+ text: string;
3345
+ }[] | undefined;
3346
+ tool_calls?: {
3347
+ function: {
3348
+ name: string;
3349
+ arguments: string;
3350
+ };
3351
+ type: "function";
3352
+ id: string;
3353
+ }[] | undefined;
3354
+ }>, z.ZodObject<{
3355
+ role: z.ZodLiteral<"tool">;
3356
+ tool_call_id: z.ZodString;
3357
+ content: z.ZodString;
3358
+ }, "strip", z.ZodTypeAny, {
2730
3359
  content: string;
2731
3360
  role: "tool";
2732
3361
  tool_call_id: string;
2733
- })[] | undefined;
2734
- tools?: {
2735
- function: {
3362
+ }, {
3363
+ content: string;
3364
+ role: "tool";
3365
+ tool_call_id: string;
3366
+ }>]>, "many">;
3367
+ frequency_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3368
+ logprobs: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
3369
+ top_logprobs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3370
+ max_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3371
+ presence_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3372
+ response_format: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
3373
+ type: z.ZodEnum<["text", "json_object"]>;
3374
+ }, "strip", z.ZodTypeAny, {
3375
+ type: "text" | "json_object";
3376
+ }, {
3377
+ type: "text" | "json_object";
3378
+ }>, z.ZodObject<{
3379
+ type: z.ZodLiteral<"json_schema">;
3380
+ json_schema: z.ZodObject<{
3381
+ name: z.ZodString;
3382
+ description: z.ZodOptional<z.ZodString>;
3383
+ strict: z.ZodOptional<z.ZodBoolean>;
3384
+ schema: z.ZodAny;
3385
+ }, "strip", z.ZodTypeAny, {
2736
3386
  name: string;
2737
3387
  description?: string | undefined;
2738
3388
  strict?: boolean | undefined;
2739
- parameters?: any;
3389
+ schema?: any;
3390
+ }, {
3391
+ name: string;
3392
+ description?: string | undefined;
3393
+ strict?: boolean | undefined;
3394
+ schema?: any;
3395
+ }>;
3396
+ }, "strip", z.ZodTypeAny, {
3397
+ type: "json_schema";
3398
+ json_schema: {
3399
+ name: string;
3400
+ description?: string | undefined;
3401
+ strict?: boolean | undefined;
3402
+ schema?: any;
2740
3403
  };
2741
- type: "function";
2742
- }[] | undefined;
2743
- }, {
2744
- temperature?: number | null | undefined;
2745
- top_p?: number | null | undefined;
2746
- frequency_penalty?: number | null | undefined;
2747
- presence_penalty?: number | null | undefined;
2748
- seed?: number | null | undefined;
2749
- logprobs?: boolean | null | undefined;
2750
- top_logprobs?: number | null | undefined;
2751
- response_format?: {
2752
- type: "text" | "json_object";
2753
- } | {
3404
+ }, {
2754
3405
  type: "json_schema";
2755
3406
  json_schema: {
2756
3407
  name: string;
@@ -2758,17 +3409,70 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2758
3409
  strict?: boolean | undefined;
2759
3410
  schema?: any;
2760
3411
  };
2761
- } | undefined;
2762
- tool_choice?: "auto" | "required" | "none" | {
3412
+ }>]>>;
3413
+ seed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3414
+ stop: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
3415
+ temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3416
+ top_p: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3417
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
3418
+ type: z.ZodLiteral<"function">;
3419
+ function: z.ZodObject<{
3420
+ name: z.ZodString;
3421
+ description: z.ZodOptional<z.ZodString>;
3422
+ strict: z.ZodOptional<z.ZodBoolean>;
3423
+ parameters: z.ZodAny;
3424
+ }, "strip", z.ZodTypeAny, {
3425
+ name: string;
3426
+ description?: string | undefined;
3427
+ strict?: boolean | undefined;
3428
+ parameters?: any;
3429
+ }, {
3430
+ name: string;
3431
+ description?: string | undefined;
3432
+ strict?: boolean | undefined;
3433
+ parameters?: any;
3434
+ }>;
3435
+ }, "strip", z.ZodTypeAny, {
2763
3436
  function: {
2764
3437
  name: string;
3438
+ description?: string | undefined;
3439
+ strict?: boolean | undefined;
3440
+ parameters?: any;
2765
3441
  };
2766
3442
  type: "function";
2767
- } | undefined;
2768
- max_tokens?: number | null | undefined;
2769
- stop?: string | string[] | null | undefined;
2770
- model?: string | undefined;
2771
- messages?: ({
3443
+ }, {
3444
+ function: {
3445
+ name: string;
3446
+ description?: string | undefined;
3447
+ strict?: boolean | undefined;
3448
+ parameters?: any;
3449
+ };
3450
+ type: "function";
3451
+ }>, "many">>;
3452
+ tool_choice: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["none", "auto", "required"]>, z.ZodObject<{
3453
+ type: z.ZodLiteral<"function">;
3454
+ function: z.ZodObject<{
3455
+ name: z.ZodString;
3456
+ }, "strip", z.ZodTypeAny, {
3457
+ name: string;
3458
+ }, {
3459
+ name: string;
3460
+ }>;
3461
+ }, "strip", z.ZodTypeAny, {
3462
+ function: {
3463
+ name: string;
3464
+ };
3465
+ type: "function";
3466
+ }, {
3467
+ function: {
3468
+ name: string;
3469
+ };
3470
+ type: "function";
3471
+ }>]>>;
3472
+ }, "max_tokens">, {
3473
+ max_completion_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3474
+ }>, "strip", z.ZodTypeAny, {
3475
+ messages: ({
2772
3476
  content: string | {
2773
3477
  type: "text";
2774
3478
  text: string;
@@ -2804,20 +3508,1153 @@ declare const OpenAIChatRequest: z.ZodEffects<z.ZodObject<{
2804
3508
  content: string;
2805
3509
  role: "tool";
2806
3510
  tool_call_id: string;
2807
- })[] | undefined;
2808
- tools?: {
3511
+ })[];
3512
+ temperature?: number | null | undefined;
3513
+ top_p?: number | null | undefined;
3514
+ frequency_penalty?: number | null | undefined;
3515
+ presence_penalty?: number | null | undefined;
3516
+ seed?: number | null | undefined;
3517
+ logprobs?: boolean | null | undefined;
3518
+ top_logprobs?: number | null | undefined;
3519
+ tool_choice?: "auto" | "required" | "none" | {
2809
3520
  function: {
2810
3521
  name: string;
2811
- description?: string | undefined;
2812
- strict?: boolean | undefined;
2813
- parameters?: any;
2814
3522
  };
2815
3523
  type: "function";
2816
- }[] | undefined;
3524
+ } | undefined;
3525
+ stop?: string | string[] | null | undefined;
3526
+ response_format?: {
3527
+ type: "text" | "json_object";
3528
+ } | {
3529
+ type: "json_schema";
3530
+ json_schema: {
3531
+ name: string;
3532
+ description?: string | undefined;
3533
+ strict?: boolean | undefined;
3534
+ schema?: any;
3535
+ };
3536
+ } | undefined;
3537
+ max_completion_tokens?: number | null | undefined;
3538
+ model?: string | undefined;
3539
+ tools?: {
3540
+ function: {
3541
+ name: string;
3542
+ description?: string | undefined;
3543
+ strict?: boolean | undefined;
3544
+ parameters?: any;
3545
+ };
3546
+ type: "function";
3547
+ }[] | undefined;
3548
+ }, {
3549
+ messages: ({
3550
+ content: string | {
3551
+ type: "text";
3552
+ text: string;
3553
+ }[];
3554
+ role: "system";
3555
+ } | {
3556
+ content: string | ({
3557
+ type: "text";
3558
+ text: string;
3559
+ } | {
3560
+ type: "image_url";
3561
+ image_url: {
3562
+ url: string;
3563
+ detail?: "auto" | "low" | "high" | undefined;
3564
+ };
3565
+ })[];
3566
+ role: "user";
3567
+ } | {
3568
+ role: "assistant";
3569
+ content?: string | {
3570
+ type: "text";
3571
+ text: string;
3572
+ }[] | undefined;
3573
+ tool_calls?: {
3574
+ function: {
3575
+ name: string;
3576
+ arguments: string;
3577
+ };
3578
+ type: "function";
3579
+ id: string;
3580
+ }[] | undefined;
3581
+ } | {
3582
+ content: string;
3583
+ role: "tool";
3584
+ tool_call_id: string;
3585
+ })[];
3586
+ temperature?: number | null | undefined;
3587
+ top_p?: number | null | undefined;
3588
+ frequency_penalty?: number | null | undefined;
3589
+ presence_penalty?: number | null | undefined;
3590
+ seed?: number | null | undefined;
3591
+ logprobs?: boolean | null | undefined;
3592
+ top_logprobs?: number | null | undefined;
3593
+ tool_choice?: "auto" | "required" | "none" | {
3594
+ function: {
3595
+ name: string;
3596
+ };
3597
+ type: "function";
3598
+ } | undefined;
3599
+ stop?: string | string[] | null | undefined;
3600
+ response_format?: {
3601
+ type: "text" | "json_object";
3602
+ } | {
3603
+ type: "json_schema";
3604
+ json_schema: {
3605
+ name: string;
3606
+ description?: string | undefined;
3607
+ strict?: boolean | undefined;
3608
+ schema?: any;
3609
+ };
3610
+ } | undefined;
3611
+ max_completion_tokens?: number | null | undefined;
3612
+ model?: string | undefined;
3613
+ tools?: {
3614
+ function: {
3615
+ name: string;
3616
+ description?: string | undefined;
3617
+ strict?: boolean | undefined;
3618
+ parameters?: any;
3619
+ };
3620
+ type: "function";
3621
+ }[] | undefined;
3622
+ }>;
3623
+ type OpenAIChatOSeriesRequestType = z.infer<typeof OpenAIChatOSeriesRequest>;
3624
+
3625
+ declare const BaseChatModelOptions: z.ZodObject<{
3626
+ apiKey: z.ZodString;
3627
+ baseUrl: z.ZodString;
3628
+ completeChatUrl: z.ZodOptional<z.ZodString>;
3629
+ streamChatUrl: z.ZodOptional<z.ZodString>;
3630
+ organization: z.ZodOptional<z.ZodString>;
3631
+ }, "strip", z.ZodTypeAny, {
3632
+ apiKey: string;
3633
+ baseUrl: string;
3634
+ completeChatUrl?: string | undefined;
3635
+ streamChatUrl?: string | undefined;
3636
+ organization?: string | undefined;
3637
+ }, {
3638
+ apiKey: string;
3639
+ baseUrl: string;
3640
+ completeChatUrl?: string | undefined;
3641
+ streamChatUrl?: string | undefined;
3642
+ organization?: string | undefined;
3643
+ }>;
3644
+ type BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;
3645
+ declare class BaseChatModel implements ChatModelV1<ChatModelSchemaType> {
3646
+ readonly version: "v1";
3647
+ modelSchema: ChatModelSchemaType;
3648
+ private readonly apiKey;
3649
+ private readonly baseUrl;
3650
+ private readonly streamChatUrl;
3651
+ private readonly completeChatUrl;
3652
+ private readonly organization;
3653
+ constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
3654
+ getDefaultBaseUrl(): UrlType;
3655
+ getDefaultHeaders(): HeadersType;
3656
+ getDefaultParams(): ParamsType;
3657
+ getRetryDelay(responseHeaders: HeadersType): {
3658
+ shouldRetry: boolean;
3659
+ delayMs: number;
3660
+ };
3661
+ getTokenCount(messages: MessageType[]): number;
3662
+ transformModelRequest(request: OpenAIChatRequestType): {
3663
+ modelName: string | undefined;
3664
+ config: ConfigType;
3665
+ messages: MessageType[];
3666
+ tools: ToolType[] | undefined;
3667
+ };
3668
+ transformConfig(config: ConfigType, messages?: MessageType[], tools?: ToolType[]): ParamsType;
3669
+ transformMessages(messages: MessageType[]): ParamsType;
3670
+ transformTools(tools: ToolType[]): ParamsType;
3671
+ getCompleteChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
3672
+ getCompleteChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
3673
+ getCompleteChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
3674
+ transformCompleteChatResponse(response: any): ChatResponseType;
3675
+ getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
3676
+ getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
3677
+ getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
3678
+ transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
3679
+ partialResponse: PartialChatResponseType;
3680
+ buffer: string;
3681
+ }>;
3682
+ }
3683
+
3684
+ declare class BaseOSeriesChatModel extends BaseChatModel {
3685
+ constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
3686
+ transformModelRequest(request: OpenAIChatOSeriesRequestType): {
3687
+ modelName: string | undefined;
3688
+ config: ConfigType;
3689
+ messages: MessageType[];
3690
+ tools: ToolType[] | undefined;
3691
+ };
3692
+ getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
3693
+ getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
3694
+ getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
3695
+ transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
3696
+ partialResponse: PartialChatResponseType;
3697
+ buffer: string;
3698
+ }>;
3699
+ }
3700
+
3701
+ declare const GPT_3_5_Turbo_0125Schema: {
3702
+ description: string;
3703
+ name: string;
3704
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
3705
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
3706
+ maxInputTokens: number;
3707
+ maxOutputTokens: number;
3708
+ config: {
3709
+ def: Record<string, {
3710
+ type: "multi-string";
3711
+ param: string;
3712
+ title: string;
3713
+ description: string;
3714
+ max: number;
3715
+ } | {
3716
+ type: "range";
3717
+ param: string;
3718
+ title: string;
3719
+ description: string;
3720
+ max: number;
3721
+ min: number;
3722
+ step: number;
3723
+ default: number;
3724
+ } | {
3725
+ type: "select-string";
3726
+ param: string;
3727
+ title: string;
3728
+ description: string;
3729
+ default: string;
3730
+ choices: string[];
3731
+ } | {
3732
+ type: "object-schema";
3733
+ param: string;
3734
+ title: string;
3735
+ description: string;
3736
+ objectSchema?: any;
3737
+ } | {
3738
+ type: "select-boolean";
3739
+ param: string;
3740
+ title: string;
3741
+ description: string;
3742
+ default: boolean | null;
3743
+ }>;
3744
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
3745
+ };
3746
+ };
3747
+ declare const GPT_3_5_Turbo_0125Options: z.ZodObject<{
3748
+ apiKey: z.ZodString;
3749
+ baseUrl: z.ZodString;
3750
+ completeChatUrl: z.ZodOptional<z.ZodString>;
3751
+ streamChatUrl: z.ZodOptional<z.ZodString>;
3752
+ organization: z.ZodOptional<z.ZodString>;
3753
+ }, "strip", z.ZodTypeAny, {
3754
+ apiKey: string;
3755
+ baseUrl: string;
3756
+ completeChatUrl?: string | undefined;
3757
+ streamChatUrl?: string | undefined;
3758
+ organization?: string | undefined;
3759
+ }, {
3760
+ apiKey: string;
3761
+ baseUrl: string;
3762
+ completeChatUrl?: string | undefined;
3763
+ streamChatUrl?: string | undefined;
3764
+ organization?: string | undefined;
3765
+ }>;
3766
+ type GPT_3_5_Turbo_0125OptionsType = z.infer<typeof GPT_3_5_Turbo_0125Options>;
3767
+ declare class GPT_3_5_Turbo_0125 extends BaseChatModel {
3768
+ constructor(options: GPT_3_5_Turbo_0125OptionsType);
3769
+ }
3770
+
3771
+ declare const GPT_3_5_Turbo_1106Schema: {
3772
+ description: string;
3773
+ name: string;
3774
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
3775
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
3776
+ maxInputTokens: number;
3777
+ maxOutputTokens: number;
3778
+ config: {
3779
+ def: Record<string, {
3780
+ type: "multi-string";
3781
+ param: string;
3782
+ title: string;
3783
+ description: string;
3784
+ max: number;
3785
+ } | {
3786
+ type: "range";
3787
+ param: string;
3788
+ title: string;
3789
+ description: string;
3790
+ max: number;
3791
+ min: number;
3792
+ step: number;
3793
+ default: number;
3794
+ } | {
3795
+ type: "select-string";
3796
+ param: string;
3797
+ title: string;
3798
+ description: string;
3799
+ default: string;
3800
+ choices: string[];
3801
+ } | {
3802
+ type: "object-schema";
3803
+ param: string;
3804
+ title: string;
3805
+ description: string;
3806
+ objectSchema?: any;
3807
+ } | {
3808
+ type: "select-boolean";
3809
+ param: string;
3810
+ title: string;
3811
+ description: string;
3812
+ default: boolean | null;
3813
+ }>;
3814
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
3815
+ };
3816
+ };
3817
+ declare const GPT_3_5_Turbo_1106Options: z.ZodObject<{
3818
+ apiKey: z.ZodString;
3819
+ baseUrl: z.ZodString;
3820
+ completeChatUrl: z.ZodOptional<z.ZodString>;
3821
+ streamChatUrl: z.ZodOptional<z.ZodString>;
3822
+ organization: z.ZodOptional<z.ZodString>;
3823
+ }, "strip", z.ZodTypeAny, {
3824
+ apiKey: string;
3825
+ baseUrl: string;
3826
+ completeChatUrl?: string | undefined;
3827
+ streamChatUrl?: string | undefined;
3828
+ organization?: string | undefined;
3829
+ }, {
3830
+ apiKey: string;
3831
+ baseUrl: string;
3832
+ completeChatUrl?: string | undefined;
3833
+ streamChatUrl?: string | undefined;
3834
+ organization?: string | undefined;
3835
+ }>;
3836
+ type GPT_3_5_Turbo_1106OptionsType = z.infer<typeof GPT_3_5_Turbo_1106Options>;
3837
+ declare class GPT_3_5_Turbo_1106 extends BaseChatModel {
3838
+ constructor(options: GPT_3_5_Turbo_1106OptionsType);
3839
+ }
3840
+
3841
+ declare const GPT_3_5_TurboSchema: {
3842
+ description: string;
3843
+ name: string;
3844
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
3845
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
3846
+ maxInputTokens: number;
3847
+ maxOutputTokens: number;
3848
+ config: {
3849
+ def: Record<string, {
3850
+ type: "multi-string";
3851
+ param: string;
3852
+ title: string;
3853
+ description: string;
3854
+ max: number;
3855
+ } | {
3856
+ type: "range";
3857
+ param: string;
3858
+ title: string;
3859
+ description: string;
3860
+ max: number;
3861
+ min: number;
3862
+ step: number;
3863
+ default: number;
3864
+ } | {
3865
+ type: "select-string";
3866
+ param: string;
3867
+ title: string;
3868
+ description: string;
3869
+ default: string;
3870
+ choices: string[];
3871
+ } | {
3872
+ type: "object-schema";
3873
+ param: string;
3874
+ title: string;
3875
+ description: string;
3876
+ objectSchema?: any;
3877
+ } | {
3878
+ type: "select-boolean";
3879
+ param: string;
3880
+ title: string;
3881
+ description: string;
3882
+ default: boolean | null;
3883
+ }>;
3884
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
3885
+ };
3886
+ };
3887
+ declare const GPT_3_5_TurboOptions: z.ZodObject<{
3888
+ apiKey: z.ZodString;
3889
+ baseUrl: z.ZodString;
3890
+ completeChatUrl: z.ZodOptional<z.ZodString>;
3891
+ streamChatUrl: z.ZodOptional<z.ZodString>;
3892
+ organization: z.ZodOptional<z.ZodString>;
3893
+ }, "strip", z.ZodTypeAny, {
3894
+ apiKey: string;
3895
+ baseUrl: string;
3896
+ completeChatUrl?: string | undefined;
3897
+ streamChatUrl?: string | undefined;
3898
+ organization?: string | undefined;
3899
+ }, {
3900
+ apiKey: string;
3901
+ baseUrl: string;
3902
+ completeChatUrl?: string | undefined;
3903
+ streamChatUrl?: string | undefined;
3904
+ organization?: string | undefined;
3905
+ }>;
3906
+ type GPT_3_5_TurboOptionsType = z.infer<typeof GPT_3_5_TurboOptions>;
3907
+ declare class GPT_3_5_Turbo extends BaseChatModel {
3908
+ constructor(options: GPT_3_5_TurboOptionsType);
3909
+ }
3910
+
3911
+ declare const GPT_4_0125_PreviewSchema: {
3912
+ description: string;
3913
+ name: string;
3914
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
3915
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
3916
+ maxInputTokens: number;
3917
+ maxOutputTokens: number;
3918
+ config: {
3919
+ def: Record<string, {
3920
+ type: "multi-string";
3921
+ param: string;
3922
+ title: string;
3923
+ description: string;
3924
+ max: number;
3925
+ } | {
3926
+ type: "range";
3927
+ param: string;
3928
+ title: string;
3929
+ description: string;
3930
+ max: number;
3931
+ min: number;
3932
+ step: number;
3933
+ default: number;
3934
+ } | {
3935
+ type: "select-string";
3936
+ param: string;
3937
+ title: string;
3938
+ description: string;
3939
+ default: string;
3940
+ choices: string[];
3941
+ } | {
3942
+ type: "object-schema";
3943
+ param: string;
3944
+ title: string;
3945
+ description: string;
3946
+ objectSchema?: any;
3947
+ } | {
3948
+ type: "select-boolean";
3949
+ param: string;
3950
+ title: string;
3951
+ description: string;
3952
+ default: boolean | null;
3953
+ }>;
3954
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
3955
+ };
3956
+ };
3957
+ declare const GPT_4_0125_PreviewOptions: z.ZodObject<{
3958
+ apiKey: z.ZodString;
3959
+ baseUrl: z.ZodString;
3960
+ completeChatUrl: z.ZodOptional<z.ZodString>;
3961
+ streamChatUrl: z.ZodOptional<z.ZodString>;
3962
+ organization: z.ZodOptional<z.ZodString>;
3963
+ }, "strip", z.ZodTypeAny, {
3964
+ apiKey: string;
3965
+ baseUrl: string;
3966
+ completeChatUrl?: string | undefined;
3967
+ streamChatUrl?: string | undefined;
3968
+ organization?: string | undefined;
3969
+ }, {
3970
+ apiKey: string;
3971
+ baseUrl: string;
3972
+ completeChatUrl?: string | undefined;
3973
+ streamChatUrl?: string | undefined;
3974
+ organization?: string | undefined;
3975
+ }>;
3976
+ type GPT_4_0125_PreviewOptionsType = z.infer<typeof GPT_4_0125_PreviewOptions>;
3977
+ declare class GPT_4_0125_Preview extends BaseChatModel {
3978
+ constructor(options: GPT_4_0125_PreviewOptionsType);
3979
+ }
3980
+
3981
+ declare const GPT_4_0613Schema: {
3982
+ description: string;
3983
+ name: string;
3984
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
3985
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
3986
+ maxInputTokens: number;
3987
+ maxOutputTokens: number;
3988
+ config: {
3989
+ def: Record<string, {
3990
+ type: "multi-string";
3991
+ param: string;
3992
+ title: string;
3993
+ description: string;
3994
+ max: number;
3995
+ } | {
3996
+ type: "range";
3997
+ param: string;
3998
+ title: string;
3999
+ description: string;
4000
+ max: number;
4001
+ min: number;
4002
+ step: number;
4003
+ default: number;
4004
+ } | {
4005
+ type: "select-string";
4006
+ param: string;
4007
+ title: string;
4008
+ description: string;
4009
+ default: string;
4010
+ choices: string[];
4011
+ } | {
4012
+ type: "object-schema";
4013
+ param: string;
4014
+ title: string;
4015
+ description: string;
4016
+ objectSchema?: any;
4017
+ } | {
4018
+ type: "select-boolean";
4019
+ param: string;
4020
+ title: string;
4021
+ description: string;
4022
+ default: boolean | null;
4023
+ }>;
4024
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4025
+ };
4026
+ };
4027
+ declare const GPT_4_0613Options: z.ZodObject<{
4028
+ apiKey: z.ZodString;
4029
+ baseUrl: z.ZodString;
4030
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4031
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4032
+ organization: z.ZodOptional<z.ZodString>;
4033
+ }, "strip", z.ZodTypeAny, {
4034
+ apiKey: string;
4035
+ baseUrl: string;
4036
+ completeChatUrl?: string | undefined;
4037
+ streamChatUrl?: string | undefined;
4038
+ organization?: string | undefined;
4039
+ }, {
4040
+ apiKey: string;
4041
+ baseUrl: string;
4042
+ completeChatUrl?: string | undefined;
4043
+ streamChatUrl?: string | undefined;
4044
+ organization?: string | undefined;
4045
+ }>;
4046
+ type GPT_4_0613OptionsType = z.infer<typeof GPT_4_0613Options>;
4047
+ declare class GPT_4_0613 extends BaseChatModel {
4048
+ constructor(options: GPT_4_0613OptionsType);
4049
+ }
4050
+
4051
+ declare const GPT_4_1106_PreviewSchema: {
4052
+ description: string;
4053
+ name: string;
4054
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4055
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
4056
+ maxInputTokens: number;
4057
+ maxOutputTokens: number;
4058
+ config: {
4059
+ def: Record<string, {
4060
+ type: "multi-string";
4061
+ param: string;
4062
+ title: string;
4063
+ description: string;
4064
+ max: number;
4065
+ } | {
4066
+ type: "range";
4067
+ param: string;
4068
+ title: string;
4069
+ description: string;
4070
+ max: number;
4071
+ min: number;
4072
+ step: number;
4073
+ default: number;
4074
+ } | {
4075
+ type: "select-string";
4076
+ param: string;
4077
+ title: string;
4078
+ description: string;
4079
+ default: string;
4080
+ choices: string[];
4081
+ } | {
4082
+ type: "object-schema";
4083
+ param: string;
4084
+ title: string;
4085
+ description: string;
4086
+ objectSchema?: any;
4087
+ } | {
4088
+ type: "select-boolean";
4089
+ param: string;
4090
+ title: string;
4091
+ description: string;
4092
+ default: boolean | null;
4093
+ }>;
4094
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4095
+ };
4096
+ };
4097
+ declare const GPT_4_1106_PreviewOptions: z.ZodObject<{
4098
+ apiKey: z.ZodString;
4099
+ baseUrl: z.ZodString;
4100
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4101
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4102
+ organization: z.ZodOptional<z.ZodString>;
4103
+ }, "strip", z.ZodTypeAny, {
4104
+ apiKey: string;
4105
+ baseUrl: string;
4106
+ completeChatUrl?: string | undefined;
4107
+ streamChatUrl?: string | undefined;
4108
+ organization?: string | undefined;
4109
+ }, {
4110
+ apiKey: string;
4111
+ baseUrl: string;
4112
+ completeChatUrl?: string | undefined;
4113
+ streamChatUrl?: string | undefined;
4114
+ organization?: string | undefined;
4115
+ }>;
4116
+ type GPT_4_1106_PreviewOptionsType = z.infer<typeof GPT_4_1106_PreviewOptions>;
4117
+ declare class GPT_4_1106_Preview extends BaseChatModel {
4118
+ constructor(options: GPT_4_1106_PreviewOptionsType);
4119
+ }
4120
+
4121
+ declare const GPT_4_Turbo_2024_04_09Schema: {
4122
+ description: string;
4123
+ name: string;
4124
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4125
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
4126
+ maxInputTokens: number;
4127
+ maxOutputTokens: number;
4128
+ config: {
4129
+ def: Record<string, {
4130
+ type: "multi-string";
4131
+ param: string;
4132
+ title: string;
4133
+ description: string;
4134
+ max: number;
4135
+ } | {
4136
+ type: "range";
4137
+ param: string;
4138
+ title: string;
4139
+ description: string;
4140
+ max: number;
4141
+ min: number;
4142
+ step: number;
4143
+ default: number;
4144
+ } | {
4145
+ type: "select-string";
4146
+ param: string;
4147
+ title: string;
4148
+ description: string;
4149
+ default: string;
4150
+ choices: string[];
4151
+ } | {
4152
+ type: "object-schema";
4153
+ param: string;
4154
+ title: string;
4155
+ description: string;
4156
+ objectSchema?: any;
4157
+ } | {
4158
+ type: "select-boolean";
4159
+ param: string;
4160
+ title: string;
4161
+ description: string;
4162
+ default: boolean | null;
4163
+ }>;
4164
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4165
+ };
4166
+ };
4167
+ declare const GPT_4_Turbo_2024_04_09Options: z.ZodObject<{
4168
+ apiKey: z.ZodString;
4169
+ baseUrl: z.ZodString;
4170
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4171
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4172
+ organization: z.ZodOptional<z.ZodString>;
4173
+ }, "strip", z.ZodTypeAny, {
4174
+ apiKey: string;
4175
+ baseUrl: string;
4176
+ completeChatUrl?: string | undefined;
4177
+ streamChatUrl?: string | undefined;
4178
+ organization?: string | undefined;
4179
+ }, {
4180
+ apiKey: string;
4181
+ baseUrl: string;
4182
+ completeChatUrl?: string | undefined;
4183
+ streamChatUrl?: string | undefined;
4184
+ organization?: string | undefined;
4185
+ }>;
4186
+ type GPT_4_Turbo_2024_04_09OptionsType = z.infer<typeof GPT_4_Turbo_2024_04_09Options>;
4187
+ declare class GPT_4_Turbo_2024_04_09 extends BaseChatModel {
4188
+ constructor(options: GPT_4_Turbo_2024_04_09OptionsType);
4189
+ }
4190
+
4191
+ declare const GPT_4_Turbo_PreviewSchema: {
4192
+ description: string;
4193
+ name: string;
4194
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4195
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
4196
+ maxInputTokens: number;
4197
+ maxOutputTokens: number;
4198
+ config: {
4199
+ def: Record<string, {
4200
+ type: "multi-string";
4201
+ param: string;
4202
+ title: string;
4203
+ description: string;
4204
+ max: number;
4205
+ } | {
4206
+ type: "range";
4207
+ param: string;
4208
+ title: string;
4209
+ description: string;
4210
+ max: number;
4211
+ min: number;
4212
+ step: number;
4213
+ default: number;
4214
+ } | {
4215
+ type: "select-string";
4216
+ param: string;
4217
+ title: string;
4218
+ description: string;
4219
+ default: string;
4220
+ choices: string[];
4221
+ } | {
4222
+ type: "object-schema";
4223
+ param: string;
4224
+ title: string;
4225
+ description: string;
4226
+ objectSchema?: any;
4227
+ } | {
4228
+ type: "select-boolean";
4229
+ param: string;
4230
+ title: string;
4231
+ description: string;
4232
+ default: boolean | null;
4233
+ }>;
4234
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4235
+ };
4236
+ };
4237
+ declare const GPT_4_Turbo_PreviewOptions: z.ZodObject<{
4238
+ apiKey: z.ZodString;
4239
+ baseUrl: z.ZodString;
4240
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4241
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4242
+ organization: z.ZodOptional<z.ZodString>;
4243
+ }, "strip", z.ZodTypeAny, {
4244
+ apiKey: string;
4245
+ baseUrl: string;
4246
+ completeChatUrl?: string | undefined;
4247
+ streamChatUrl?: string | undefined;
4248
+ organization?: string | undefined;
4249
+ }, {
4250
+ apiKey: string;
4251
+ baseUrl: string;
4252
+ completeChatUrl?: string | undefined;
4253
+ streamChatUrl?: string | undefined;
4254
+ organization?: string | undefined;
4255
+ }>;
4256
+ type GPT_4_Turbo_PreviewOptionsType = z.infer<typeof GPT_4_Turbo_PreviewOptions>;
4257
+ declare class GPT_4_Turbo_Preview extends BaseChatModel {
4258
+ constructor(options: GPT_4_Turbo_PreviewOptionsType);
4259
+ }
4260
+
4261
+ declare const GPT_4_TurboSchema: {
4262
+ description: string;
4263
+ name: string;
4264
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4265
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
4266
+ maxInputTokens: number;
4267
+ maxOutputTokens: number;
4268
+ config: {
4269
+ def: Record<string, {
4270
+ type: "multi-string";
4271
+ param: string;
4272
+ title: string;
4273
+ description: string;
4274
+ max: number;
4275
+ } | {
4276
+ type: "range";
4277
+ param: string;
4278
+ title: string;
4279
+ description: string;
4280
+ max: number;
4281
+ min: number;
4282
+ step: number;
4283
+ default: number;
4284
+ } | {
4285
+ type: "select-string";
4286
+ param: string;
4287
+ title: string;
4288
+ description: string;
4289
+ default: string;
4290
+ choices: string[];
4291
+ } | {
4292
+ type: "object-schema";
4293
+ param: string;
4294
+ title: string;
4295
+ description: string;
4296
+ objectSchema?: any;
4297
+ } | {
4298
+ type: "select-boolean";
4299
+ param: string;
4300
+ title: string;
4301
+ description: string;
4302
+ default: boolean | null;
4303
+ }>;
4304
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4305
+ };
4306
+ };
4307
+ declare const GPT_4_TurboOptions: z.ZodObject<{
4308
+ apiKey: z.ZodString;
4309
+ baseUrl: z.ZodString;
4310
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4311
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4312
+ organization: z.ZodOptional<z.ZodString>;
4313
+ }, "strip", z.ZodTypeAny, {
4314
+ apiKey: string;
4315
+ baseUrl: string;
4316
+ completeChatUrl?: string | undefined;
4317
+ streamChatUrl?: string | undefined;
4318
+ organization?: string | undefined;
4319
+ }, {
4320
+ apiKey: string;
4321
+ baseUrl: string;
4322
+ completeChatUrl?: string | undefined;
4323
+ streamChatUrl?: string | undefined;
4324
+ organization?: string | undefined;
4325
+ }>;
4326
+ type GPT_4_TurboOptionsType = z.infer<typeof GPT_4_TurboOptions>;
4327
+ declare class GPT_4_Turbo extends BaseChatModel {
4328
+ constructor(options: GPT_4_TurboOptionsType);
4329
+ }
4330
+
4331
+ declare const GPT_4Schema: {
4332
+ description: string;
4333
+ name: string;
4334
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4335
+ modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
4336
+ maxInputTokens: number;
4337
+ maxOutputTokens: number;
4338
+ config: {
4339
+ def: Record<string, {
4340
+ type: "multi-string";
4341
+ param: string;
4342
+ title: string;
4343
+ description: string;
4344
+ max: number;
4345
+ } | {
4346
+ type: "range";
4347
+ param: string;
4348
+ title: string;
4349
+ description: string;
4350
+ max: number;
4351
+ min: number;
4352
+ step: number;
4353
+ default: number;
4354
+ } | {
4355
+ type: "select-string";
4356
+ param: string;
4357
+ title: string;
4358
+ description: string;
4359
+ default: string;
4360
+ choices: string[];
4361
+ } | {
4362
+ type: "object-schema";
4363
+ param: string;
4364
+ title: string;
4365
+ description: string;
4366
+ objectSchema?: any;
4367
+ } | {
4368
+ type: "select-boolean";
4369
+ param: string;
4370
+ title: string;
4371
+ description: string;
4372
+ default: boolean | null;
4373
+ }>;
4374
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4375
+ };
4376
+ };
4377
+ declare const GPT_4Options: z.ZodObject<{
4378
+ apiKey: z.ZodString;
4379
+ baseUrl: z.ZodString;
4380
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4381
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4382
+ organization: z.ZodOptional<z.ZodString>;
4383
+ }, "strip", z.ZodTypeAny, {
4384
+ apiKey: string;
4385
+ baseUrl: string;
4386
+ completeChatUrl?: string | undefined;
4387
+ streamChatUrl?: string | undefined;
4388
+ organization?: string | undefined;
4389
+ }, {
4390
+ apiKey: string;
4391
+ baseUrl: string;
4392
+ completeChatUrl?: string | undefined;
4393
+ streamChatUrl?: string | undefined;
4394
+ organization?: string | undefined;
4395
+ }>;
4396
+ type GPT_4OptionsType = z.infer<typeof GPT_4Options>;
4397
+ declare class GPT_4 extends BaseChatModel {
4398
+ constructor(options: GPT_4OptionsType);
4399
+ }
4400
+
4401
+ declare const GPT_4o_2024_08_06Schema: {
4402
+ description: string;
4403
+ name: string;
4404
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4405
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
4406
+ maxInputTokens: number;
4407
+ maxOutputTokens: number;
4408
+ config: {
4409
+ def: Record<string, {
4410
+ type: "multi-string";
4411
+ param: string;
4412
+ title: string;
4413
+ description: string;
4414
+ max: number;
4415
+ } | {
4416
+ type: "range";
4417
+ param: string;
4418
+ title: string;
4419
+ description: string;
4420
+ max: number;
4421
+ min: number;
4422
+ step: number;
4423
+ default: number;
4424
+ } | {
4425
+ type: "select-string";
4426
+ param: string;
4427
+ title: string;
4428
+ description: string;
4429
+ default: string;
4430
+ choices: string[];
4431
+ } | {
4432
+ type: "object-schema";
4433
+ param: string;
4434
+ title: string;
4435
+ description: string;
4436
+ objectSchema?: any;
4437
+ } | {
4438
+ type: "select-boolean";
4439
+ param: string;
4440
+ title: string;
4441
+ description: string;
4442
+ default: boolean | null;
4443
+ }>;
4444
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4445
+ };
4446
+ };
4447
+ declare const GPT_4o_2024_08_06Options: z.ZodObject<{
4448
+ apiKey: z.ZodString;
4449
+ baseUrl: z.ZodString;
4450
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4451
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4452
+ organization: z.ZodOptional<z.ZodString>;
4453
+ }, "strip", z.ZodTypeAny, {
4454
+ apiKey: string;
4455
+ baseUrl: string;
4456
+ completeChatUrl?: string | undefined;
4457
+ streamChatUrl?: string | undefined;
4458
+ organization?: string | undefined;
4459
+ }, {
4460
+ apiKey: string;
4461
+ baseUrl: string;
4462
+ completeChatUrl?: string | undefined;
4463
+ streamChatUrl?: string | undefined;
4464
+ organization?: string | undefined;
4465
+ }>;
4466
+ type GPT_4o_2024_08_06OptionsType = z.infer<typeof GPT_4o_2024_08_06Options>;
4467
+ declare class GPT_4o_2024_08_06 extends BaseChatModel {
4468
+ constructor(options: GPT_4o_2024_08_06OptionsType);
4469
+ }
4470
+
4471
+ declare const GPT_4o_MiniSchema: {
4472
+ description: string;
4473
+ name: string;
4474
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4475
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
4476
+ maxInputTokens: number;
4477
+ maxOutputTokens: number;
4478
+ config: {
4479
+ def: Record<string, {
4480
+ type: "multi-string";
4481
+ param: string;
4482
+ title: string;
4483
+ description: string;
4484
+ max: number;
4485
+ } | {
4486
+ type: "range";
4487
+ param: string;
4488
+ title: string;
4489
+ description: string;
4490
+ max: number;
4491
+ min: number;
4492
+ step: number;
4493
+ default: number;
4494
+ } | {
4495
+ type: "select-string";
4496
+ param: string;
4497
+ title: string;
4498
+ description: string;
4499
+ default: string;
4500
+ choices: string[];
4501
+ } | {
4502
+ type: "object-schema";
4503
+ param: string;
4504
+ title: string;
4505
+ description: string;
4506
+ objectSchema?: any;
4507
+ } | {
4508
+ type: "select-boolean";
4509
+ param: string;
4510
+ title: string;
4511
+ description: string;
4512
+ default: boolean | null;
4513
+ }>;
4514
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4515
+ };
4516
+ };
4517
+ declare const GPT_4o_MiniOptions: z.ZodObject<{
4518
+ apiKey: z.ZodString;
4519
+ baseUrl: z.ZodString;
4520
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4521
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4522
+ organization: z.ZodOptional<z.ZodString>;
4523
+ }, "strip", z.ZodTypeAny, {
4524
+ apiKey: string;
4525
+ baseUrl: string;
4526
+ completeChatUrl?: string | undefined;
4527
+ streamChatUrl?: string | undefined;
4528
+ organization?: string | undefined;
4529
+ }, {
4530
+ apiKey: string;
4531
+ baseUrl: string;
4532
+ completeChatUrl?: string | undefined;
4533
+ streamChatUrl?: string | undefined;
4534
+ organization?: string | undefined;
4535
+ }>;
4536
+ type GPT_4o_MiniOptionsType = z.infer<typeof GPT_4o_MiniOptions>;
4537
+ declare class GPT_4o_Mini extends BaseChatModel {
4538
+ constructor(options: GPT_4o_MiniOptionsType);
4539
+ }
4540
+
4541
+ declare const GPT_4oSchema: {
4542
+ description: string;
4543
+ name: string;
4544
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4545
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
4546
+ maxInputTokens: number;
4547
+ maxOutputTokens: number;
4548
+ config: {
4549
+ def: Record<string, {
4550
+ type: "multi-string";
4551
+ param: string;
4552
+ title: string;
4553
+ description: string;
4554
+ max: number;
4555
+ } | {
4556
+ type: "range";
4557
+ param: string;
4558
+ title: string;
4559
+ description: string;
4560
+ max: number;
4561
+ min: number;
4562
+ step: number;
4563
+ default: number;
4564
+ } | {
4565
+ type: "select-string";
4566
+ param: string;
4567
+ title: string;
4568
+ description: string;
4569
+ default: string;
4570
+ choices: string[];
4571
+ } | {
4572
+ type: "object-schema";
4573
+ param: string;
4574
+ title: string;
4575
+ description: string;
4576
+ objectSchema?: any;
4577
+ } | {
4578
+ type: "select-boolean";
4579
+ param: string;
4580
+ title: string;
4581
+ description: string;
4582
+ default: boolean | null;
4583
+ }>;
4584
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4585
+ };
4586
+ };
4587
+ declare const GPT_4oOptions: z.ZodObject<{
4588
+ apiKey: z.ZodString;
4589
+ baseUrl: z.ZodString;
4590
+ completeChatUrl: z.ZodOptional<z.ZodString>;
4591
+ streamChatUrl: z.ZodOptional<z.ZodString>;
4592
+ organization: z.ZodOptional<z.ZodString>;
4593
+ }, "strip", z.ZodTypeAny, {
4594
+ apiKey: string;
4595
+ baseUrl: string;
4596
+ completeChatUrl?: string | undefined;
4597
+ streamChatUrl?: string | undefined;
4598
+ organization?: string | undefined;
4599
+ }, {
4600
+ apiKey: string;
4601
+ baseUrl: string;
4602
+ completeChatUrl?: string | undefined;
4603
+ streamChatUrl?: string | undefined;
4604
+ organization?: string | undefined;
2817
4605
  }>;
2818
- type OpenAIChatRequestType = z.infer<typeof OpenAIChatRequest>;
4606
+ type GPT_4oOptionsType = z.infer<typeof GPT_4oOptions>;
4607
+ declare class GPT_4o extends BaseChatModel {
4608
+ constructor(options: GPT_4oOptionsType);
4609
+ }
2819
4610
 
2820
- declare const BaseChatModelOptions: z.ZodObject<{
4611
+ declare const O1_MiniSchema: {
4612
+ description: string;
4613
+ name: string;
4614
+ roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
4615
+ modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
4616
+ maxInputTokens: number;
4617
+ maxOutputTokens: number;
4618
+ config: {
4619
+ def: Record<string, {
4620
+ type: "multi-string";
4621
+ param: string;
4622
+ title: string;
4623
+ description: string;
4624
+ max: number;
4625
+ } | {
4626
+ type: "range";
4627
+ param: string;
4628
+ title: string;
4629
+ description: string;
4630
+ max: number;
4631
+ min: number;
4632
+ step: number;
4633
+ default: number;
4634
+ } | {
4635
+ type: "select-string";
4636
+ param: string;
4637
+ title: string;
4638
+ description: string;
4639
+ default: string;
4640
+ choices: string[];
4641
+ } | {
4642
+ type: "object-schema";
4643
+ param: string;
4644
+ title: string;
4645
+ description: string;
4646
+ objectSchema?: any;
4647
+ } | {
4648
+ type: "select-boolean";
4649
+ param: string;
4650
+ title: string;
4651
+ description: string;
4652
+ default: boolean | null;
4653
+ }>;
4654
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4655
+ };
4656
+ };
4657
+ declare const O1_MiniOptions: z.ZodObject<{
2821
4658
  apiKey: z.ZodString;
2822
4659
  baseUrl: z.ZodString;
2823
4660
  completeChatUrl: z.ZodOptional<z.ZodString>;
@@ -2836,47 +4673,12 @@ declare const BaseChatModelOptions: z.ZodObject<{
2836
4673
  streamChatUrl?: string | undefined;
2837
4674
  organization?: string | undefined;
2838
4675
  }>;
2839
- type BaseChatModelOptionsType = z.infer<typeof BaseChatModelOptions>;
2840
- declare class BaseChatModel implements ChatModelV1<ChatModelSchemaType> {
2841
- readonly version: "v1";
2842
- modelSchema: ChatModelSchemaType;
2843
- private readonly apiKey;
2844
- private readonly baseUrl;
2845
- private readonly streamChatUrl;
2846
- private readonly completeChatUrl;
2847
- private readonly organization;
2848
- constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
2849
- getDefaultBaseUrl(): UrlType;
2850
- getDefaultHeaders(): HeadersType;
2851
- getDefaultParams(): ParamsType;
2852
- getRetryDelay(responseHeaders: HeadersType): {
2853
- shouldRetry: boolean;
2854
- delayMs: number;
2855
- };
2856
- getTokenCount(messages: MessageType[]): number;
2857
- transformModelRequest(request: OpenAIChatRequestType): {
2858
- modelName: string | undefined;
2859
- config: ConfigType | undefined;
2860
- messages: MessageType[] | undefined;
2861
- tools: ToolType[] | undefined;
2862
- };
2863
- transformConfig(config: ConfigType, messages?: MessageType[], tools?: ToolType[]): ParamsType;
2864
- transformMessages(messages: MessageType[]): ParamsType;
2865
- transformTools(tools: ToolType[]): ParamsType;
2866
- getCompleteChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
2867
- getCompleteChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
2868
- getCompleteChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
2869
- transformCompleteChatResponse(response: any): ChatResponseType;
2870
- getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
2871
- getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
2872
- getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
2873
- transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
2874
- partialResponse: PartialChatResponseType;
2875
- buffer: string;
2876
- }>;
4676
+ type O1_MiniOptionsType = z.infer<typeof O1_MiniOptions>;
4677
+ declare class O1_Mini extends BaseOSeriesChatModel {
4678
+ constructor(options: O1_MiniOptionsType);
2877
4679
  }
2878
4680
 
2879
- declare const GPT4oSchema: {
4681
+ declare const O1_PreviewSchema: {
2880
4682
  description: string;
2881
4683
  name: string;
2882
4684
  roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
@@ -2922,7 +4724,7 @@ declare const GPT4oSchema: {
2922
4724
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
2923
4725
  };
2924
4726
  };
2925
- declare const GPT4oOptions: z.ZodObject<{
4727
+ declare const O1_PreviewOptions: z.ZodObject<{
2926
4728
  apiKey: z.ZodString;
2927
4729
  baseUrl: z.ZodString;
2928
4730
  completeChatUrl: z.ZodOptional<z.ZodString>;
@@ -2941,9 +4743,9 @@ declare const GPT4oOptions: z.ZodObject<{
2941
4743
  streamChatUrl?: string | undefined;
2942
4744
  organization?: string | undefined;
2943
4745
  }>;
2944
- type GPT4oOptionsType = z.infer<typeof GPT4oOptions>;
2945
- declare class GPT4o extends BaseChatModel {
2946
- constructor(options: GPT4oOptionsType);
4746
+ type O1_PreviewOptionsType = z.infer<typeof O1_PreviewOptions>;
4747
+ declare class O1_Preview extends BaseOSeriesChatModel {
4748
+ constructor(options: O1_PreviewOptionsType);
2947
4749
  }
2948
4750
 
2949
4751
  declare const OpenAIEmbeddingModelModalities: EmbeddingModelSchemaType["modalities"];
@@ -3005,19 +4807,19 @@ declare const OpenAIEmbeddingRequestInput: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z
3005
4807
  type OpenAIEmbeddingRequestInputType = z.infer<typeof OpenAIEmbeddingRequestInput>;
3006
4808
  declare const OpenAIEmbeddingRequest: z.ZodObject<{
3007
4809
  model: z.ZodOptional<z.ZodString>;
3008
- input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodArray<z.ZodNumber, "many">]>, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>>;
4810
+ input: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodArray<z.ZodNumber, "many">]>, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>;
3009
4811
  encoding_format: z.ZodOptional<z.ZodEnum<["float", "base64"]>>;
3010
4812
  dimensions: z.ZodOptional<z.ZodNumber>;
3011
4813
  }, "strip", z.ZodTypeAny, {
4814
+ input: string | string[] | number[] | number[][];
3012
4815
  encoding_format?: "float" | "base64" | undefined;
3013
4816
  dimensions?: number | undefined;
3014
4817
  model?: string | undefined;
3015
- input?: string | string[] | number[] | number[][] | undefined;
3016
4818
  }, {
4819
+ input: string | string[] | number[] | number[][];
3017
4820
  encoding_format?: "float" | "base64" | undefined;
3018
4821
  dimensions?: number | undefined;
3019
4822
  model?: string | undefined;
3020
- input?: string | string[] | number[] | number[][] | undefined;
3021
4823
  }>;
3022
4824
  type OpenAIEmbeddingRequestType = z.infer<typeof OpenAIEmbeddingRequest>;
3023
4825
 
@@ -3052,8 +4854,8 @@ declare class BaseEmbeddingModel implements EmbeddingModelV1<EmbeddingModelSchem
3052
4854
  getTokenCount(requests: EmbeddingRequestsType): number;
3053
4855
  transformModelRequest(request: any): {
3054
4856
  modelName: string | undefined;
3055
- config: ConfigType | undefined;
3056
- embeddingRequests: EmbeddingRequestsType | undefined;
4857
+ config: ConfigType;
4858
+ embeddingRequests: EmbeddingRequestsType;
3057
4859
  };
3058
4860
  transformConfig(config: ConfigType, requests?: EmbeddingRequestsType): ParamsType;
3059
4861
  transformEmbeddingRequests(requests: EmbeddingRequestsType): ParamsType;
@@ -3063,7 +4865,133 @@ declare class BaseEmbeddingModel implements EmbeddingModelV1<EmbeddingModelSchem
3063
4865
  transformGetEmbeddingsResponse(response: any): EmbeddingResponseType;
3064
4866
  }
3065
4867
 
3066
- declare const TextEmbeddingAda002Schema: {
4868
+ declare const Text_Embedding_Ada002Schema: {
4869
+ description: string;
4870
+ name: string;
4871
+ modalities: ["text" | "token", ...("text" | "token")[]];
4872
+ maxInputTokens: number;
4873
+ maxOutputTokens: number;
4874
+ config: {
4875
+ def: Record<string, {
4876
+ type: "multi-string";
4877
+ param: string;
4878
+ title: string;
4879
+ description: string;
4880
+ max: number;
4881
+ } | {
4882
+ type: "range";
4883
+ param: string;
4884
+ title: string;
4885
+ description: string;
4886
+ max: number;
4887
+ min: number;
4888
+ step: number;
4889
+ default: number;
4890
+ } | {
4891
+ type: "select-string";
4892
+ param: string;
4893
+ title: string;
4894
+ description: string;
4895
+ default: string;
4896
+ choices: string[];
4897
+ } | {
4898
+ type: "object-schema";
4899
+ param: string;
4900
+ title: string;
4901
+ description: string;
4902
+ objectSchema?: any;
4903
+ } | {
4904
+ type: "select-boolean";
4905
+ param: string;
4906
+ title: string;
4907
+ description: string;
4908
+ default: boolean | null;
4909
+ }>;
4910
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4911
+ };
4912
+ };
4913
+ declare const Text_Embedding_Ada002_Options: z.ZodObject<{
4914
+ apiKey: z.ZodString;
4915
+ baseUrl: z.ZodString;
4916
+ getEmbeddingsUrl: z.ZodOptional<z.ZodString>;
4917
+ }, "strip", z.ZodTypeAny, {
4918
+ apiKey: string;
4919
+ baseUrl: string;
4920
+ getEmbeddingsUrl?: string | undefined;
4921
+ }, {
4922
+ apiKey: string;
4923
+ baseUrl: string;
4924
+ getEmbeddingsUrl?: string | undefined;
4925
+ }>;
4926
+ type Text_Embedding_Ada002_OptionsType = z.infer<typeof Text_Embedding_Ada002_Options>;
4927
+ declare class Text_Embedding_Ada002 extends BaseEmbeddingModel {
4928
+ constructor(options: Text_Embedding_Ada002_OptionsType);
4929
+ }
4930
+
4931
+ declare const Text_Embedding_3_SmallSchema: {
4932
+ description: string;
4933
+ name: string;
4934
+ modalities: ["text" | "token", ...("text" | "token")[]];
4935
+ maxInputTokens: number;
4936
+ maxOutputTokens: number;
4937
+ config: {
4938
+ def: Record<string, {
4939
+ type: "multi-string";
4940
+ param: string;
4941
+ title: string;
4942
+ description: string;
4943
+ max: number;
4944
+ } | {
4945
+ type: "range";
4946
+ param: string;
4947
+ title: string;
4948
+ description: string;
4949
+ max: number;
4950
+ min: number;
4951
+ step: number;
4952
+ default: number;
4953
+ } | {
4954
+ type: "select-string";
4955
+ param: string;
4956
+ title: string;
4957
+ description: string;
4958
+ default: string;
4959
+ choices: string[];
4960
+ } | {
4961
+ type: "object-schema";
4962
+ param: string;
4963
+ title: string;
4964
+ description: string;
4965
+ objectSchema?: any;
4966
+ } | {
4967
+ type: "select-boolean";
4968
+ param: string;
4969
+ title: string;
4970
+ description: string;
4971
+ default: boolean | null;
4972
+ }>;
4973
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
4974
+ };
4975
+ };
4976
+ declare const Text_Embedding_3_Small_Options: z.ZodObject<{
4977
+ apiKey: z.ZodString;
4978
+ baseUrl: z.ZodString;
4979
+ getEmbeddingsUrl: z.ZodOptional<z.ZodString>;
4980
+ }, "strip", z.ZodTypeAny, {
4981
+ apiKey: string;
4982
+ baseUrl: string;
4983
+ getEmbeddingsUrl?: string | undefined;
4984
+ }, {
4985
+ apiKey: string;
4986
+ baseUrl: string;
4987
+ getEmbeddingsUrl?: string | undefined;
4988
+ }>;
4989
+ type Text_Embedding_3_Small_OptionsType = z.infer<typeof Text_Embedding_3_Small_Options>;
4990
+ declare class Text_Embedding_3_Small extends BaseEmbeddingModel {
4991
+ constructor(options: Text_Embedding_3_Small_OptionsType);
4992
+ }
4993
+
4994
+ declare const Text_Embedding_3_LargeSchema: {
3067
4995
  description: string;
3068
4996
  name: string;
3069
4997
  modalities: ["text" | "token", ...("text" | "token")[]];
@@ -3108,7 +5036,7 @@ declare const TextEmbeddingAda002Schema: {
3108
5036
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
3109
5037
  };
3110
5038
  };
3111
- declare const TextEmbeddingAda002Options: z.ZodObject<{
5039
+ declare const Text_Embedding_3_Large_Options: z.ZodObject<{
3112
5040
  apiKey: z.ZodString;
3113
5041
  baseUrl: z.ZodString;
3114
5042
  getEmbeddingsUrl: z.ZodOptional<z.ZodString>;
@@ -3121,9 +5049,9 @@ declare const TextEmbeddingAda002Options: z.ZodObject<{
3121
5049
  baseUrl: string;
3122
5050
  getEmbeddingsUrl?: string | undefined;
3123
5051
  }>;
3124
- type TextEmbeddingAda002OptionsType = z.infer<typeof TextEmbeddingAda002Options>;
3125
- declare class TextEmbeddingAda002 extends BaseEmbeddingModel {
3126
- constructor(options: TextEmbeddingAda002OptionsType);
5052
+ type Text_Embedding_3_Large_OptionsType = z.infer<typeof Text_Embedding_3_Large_Options>;
5053
+ declare class Text_Embedding_3_Large extends BaseEmbeddingModel {
5054
+ constructor(options: Text_Embedding_3_Large_OptionsType);
3127
5055
  }
3128
5056
 
3129
5057
  declare const ProviderLiteral = "openai";
@@ -3143,4 +5071,4 @@ declare class OpenAI<O extends Record<string, any> = Record<string, any>> implem
3143
5071
  embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType>;
3144
5072
  }
3145
5073
 
3146
- export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, ChatModelResponseSchemaConfigDef, ChatModelResponseSchemaConfigSchema, EmbeddingModelBaseConfigDef, EmbeddingModelBaseConfigSchema, GPT4o, GPT4oOptions, type GPT4oOptionsType, GPT4oSchema, OpenAI, OpenAIChatModelConfigs, OpenAIChatModelModalities, OpenAIChatModelModalitiesEnum, OpenAIChatModelRoles, OpenAIChatModelRolesMap, OpenAIChatRequest, OpenAIChatRequestAssistantMessage, type OpenAIChatRequestAssistantMessageType, OpenAIChatRequestImageContent, type OpenAIChatRequestImageContentType, OpenAIChatRequestMessage, type OpenAIChatRequestMessageType, OpenAIChatRequestResponseFormat, type OpenAIChatRequestResponseFormatType, OpenAIChatRequestSystemMessage, type OpenAIChatRequestSystemMessageType, OpenAIChatRequestTextContent, type OpenAIChatRequestTextContentType, OpenAIChatRequestTool, OpenAIChatRequestToolCallContent, type OpenAIChatRequestToolCallContentType, OpenAIChatRequestToolChoiceEnum, type OpenAIChatRequestToolChoiceEnumType, OpenAIChatRequestToolChoiceFunction, type OpenAIChatRequestToolChoiceFunctionType, OpenAIChatRequestToolMessage, type OpenAIChatRequestToolMessageType, type OpenAIChatRequestToolType, type OpenAIChatRequestType, OpenAIChatRequestUserMessage, type OpenAIChatRequestUserMessageType, OpenAICompleteChatResponse, type OpenAICompleteChatResponseType, OpenAIEmbeddingModelConfigs, OpenAIEmbeddingModelModalities, OpenAIEmbeddingModelModalitiesEnum, OpenAIEmbeddingRequest, OpenAIEmbeddingRequestInput, type OpenAIEmbeddingRequestInputType, type OpenAIEmbeddingRequestType, OpenAIGetEmbeddingsResponse, OpenAIStreamChatResponse, type OpenAIStreamChatResponseType, OpenAIToolCallsCompleteChatResponse, OpenAIToolCallsStreamChatResponse, ProviderLiteral, TextEmbeddingAda002, TextEmbeddingAda002Options, type TextEmbeddingAda002OptionsType, TextEmbeddingAda002Schema, dimensions, encodingFormat, frequencyPenalty, logProbs, maxTokens, presencePenalty, responseFormat, seed, stop, temperature, toolChoice, topLogProbs, topP };
5074
+ export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType, BaseOSeriesChatModel, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, ChatModelOSeriesConfigDef, ChatModelOSeriesConfigSchema, ChatModelResponseFormatConfigDef, ChatModelResponseFormatConfigSchema, ChatModelResponseSchemaConfigDef, ChatModelResponseSchemaConfigSchema, EmbeddingModelBaseConfigDef, EmbeddingModelBaseConfigSchema, EmbeddingModelDimensionsConfigDef, EmbeddingModelDimensionsConfigSchema, GPT_3_5_Turbo, GPT_3_5_TurboOptions, type GPT_3_5_TurboOptionsType, GPT_3_5_TurboSchema, GPT_3_5_Turbo_0125, GPT_3_5_Turbo_0125Options, type GPT_3_5_Turbo_0125OptionsType, GPT_3_5_Turbo_0125Schema, GPT_3_5_Turbo_1106, GPT_3_5_Turbo_1106Options, type GPT_3_5_Turbo_1106OptionsType, GPT_3_5_Turbo_1106Schema, GPT_4, GPT_4Options, type GPT_4OptionsType, GPT_4Schema, GPT_4_0125_Preview, GPT_4_0125_PreviewOptions, type GPT_4_0125_PreviewOptionsType, GPT_4_0125_PreviewSchema, GPT_4_0613, GPT_4_0613Options, type GPT_4_0613OptionsType, GPT_4_0613Schema, GPT_4_1106_Preview, GPT_4_1106_PreviewOptions, type GPT_4_1106_PreviewOptionsType, GPT_4_1106_PreviewSchema, GPT_4_Turbo, GPT_4_TurboOptions, type GPT_4_TurboOptionsType, GPT_4_TurboSchema, GPT_4_Turbo_2024_04_09, GPT_4_Turbo_2024_04_09Options, type GPT_4_Turbo_2024_04_09OptionsType, GPT_4_Turbo_2024_04_09Schema, GPT_4_Turbo_Preview, GPT_4_Turbo_PreviewOptions, type GPT_4_Turbo_PreviewOptionsType, GPT_4_Turbo_PreviewSchema, GPT_4o, GPT_4oOptions, type GPT_4oOptionsType, GPT_4oSchema, GPT_4o_2024_08_06, GPT_4o_2024_08_06Options, type GPT_4o_2024_08_06OptionsType, GPT_4o_2024_08_06Schema, GPT_4o_Mini, GPT_4o_MiniOptions, type GPT_4o_MiniOptionsType, GPT_4o_MiniSchema, O1_Mini, O1_MiniOptions, type O1_MiniOptionsType, O1_MiniSchema, O1_Preview, O1_PreviewOptions, type O1_PreviewOptionsType, O1_PreviewSchema, OpenAI, OpenAIChatModelConfigs, OpenAIChatModelModalities, OpenAIChatModelModalitiesEnum, OpenAIChatModelRoles, OpenAIChatModelRolesMap, OpenAIChatModelTextToolModalities, OpenAIChatModelTextToolModalitiesEnum, OpenAIChatOSeriesRequest, type OpenAIChatOSeriesRequestType, OpenAIChatRequest, OpenAIChatRequestAssistantMessage, type OpenAIChatRequestAssistantMessageType, OpenAIChatRequestImageContent, type OpenAIChatRequestImageContentType, OpenAIChatRequestMessage, type OpenAIChatRequestMessageType, OpenAIChatRequestResponseFormat, type OpenAIChatRequestResponseFormatType, OpenAIChatRequestSystemMessage, type OpenAIChatRequestSystemMessageType, OpenAIChatRequestTextContent, type OpenAIChatRequestTextContentType, OpenAIChatRequestTool, OpenAIChatRequestToolCallContent, type OpenAIChatRequestToolCallContentType, OpenAIChatRequestToolChoiceEnum, type OpenAIChatRequestToolChoiceEnumType, OpenAIChatRequestToolChoiceFunction, type OpenAIChatRequestToolChoiceFunctionType, OpenAIChatRequestToolMessage, type OpenAIChatRequestToolMessageType, type OpenAIChatRequestToolType, type OpenAIChatRequestType, OpenAIChatRequestUserMessage, type OpenAIChatRequestUserMessageType, OpenAICompleteChatResponse, type OpenAICompleteChatResponseType, OpenAIEmbeddingModelConfigs, OpenAIEmbeddingModelModalities, OpenAIEmbeddingModelModalitiesEnum, OpenAIEmbeddingRequest, OpenAIEmbeddingRequestInput, type OpenAIEmbeddingRequestInputType, type OpenAIEmbeddingRequestType, OpenAIGetEmbeddingsResponse, OpenAIStreamChatResponse, type OpenAIStreamChatResponseType, OpenAIToolCallsCompleteChatResponse, OpenAIToolCallsStreamChatResponse, ProviderLiteral, Text_Embedding_3_Large, Text_Embedding_3_LargeSchema, Text_Embedding_3_Large_Options, type Text_Embedding_3_Large_OptionsType, Text_Embedding_3_Small, Text_Embedding_3_SmallSchema, Text_Embedding_3_Small_Options, type Text_Embedding_3_Small_OptionsType, Text_Embedding_Ada002, Text_Embedding_Ada002Schema, Text_Embedding_Ada002_Options, type Text_Embedding_Ada002_OptionsType, dimensions, encodingFormat, frequencyPenalty, logProbs, maxTokens, presencePenalty, seed, stop, temperature, toolChoice, topLogProbs, topP };