@adaline/provider 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2022 @@
1
+ import { z } from 'zod';
2
+ import { RoleEnum, ModalityEnum, MessageType, ConfigType, ToolType, PartialMessageType, EmbeddingModalityEnum, EmbeddingRequestsType, EmbeddingsType } from '@adaline/types';
3
+
4
+ declare class ApiRequestError extends Error {
5
+ readonly name = "Gateway_ApiRequestError";
6
+ readonly info: string;
7
+ readonly cause: unknown;
8
+ constructor({ info, error }: {
9
+ info: string;
10
+ error: unknown;
11
+ });
12
+ static isApiRequestError(error: unknown): error is ApiRequestError;
13
+ toJSON(): {
14
+ name: string;
15
+ message: string;
16
+ cause: unknown;
17
+ stack: string | undefined;
18
+ info: string;
19
+ };
20
+ }
21
+
22
+ declare class ApiResponseError extends Error {
23
+ readonly name = "Gateway_ApiResponseError";
24
+ readonly info: string;
25
+ readonly cause: unknown;
26
+ constructor({ info, error }: {
27
+ info: string;
28
+ error: unknown;
29
+ });
30
+ static isApiResponseError(error: unknown): error is ApiResponseError;
31
+ toJSON(): {
32
+ name: string;
33
+ message: string;
34
+ cause: unknown;
35
+ stack: string | undefined;
36
+ info: string;
37
+ };
38
+ }
39
+
40
+ declare class DownloadError extends Error {
41
+ readonly name = "Gateway_DownloadError";
42
+ readonly info: string;
43
+ readonly cause: unknown;
44
+ constructor({ info, error }: {
45
+ info: string;
46
+ error: unknown;
47
+ });
48
+ static isDownloadError(error: unknown): error is DownloadError;
49
+ toJSON(): {
50
+ name: string;
51
+ message: string;
52
+ cause: unknown;
53
+ stack: string | undefined;
54
+ info: string;
55
+ };
56
+ }
57
+
58
+ declare class InvalidAuthError extends Error {
59
+ readonly name = "Gateway_InvalidAuthError";
60
+ readonly info: string;
61
+ readonly cause: unknown;
62
+ constructor({ info, error }: {
63
+ info: string;
64
+ error: unknown;
65
+ });
66
+ static isInvalidAuthError(error: unknown): error is InvalidAuthError;
67
+ toJSON(): {
68
+ name: string;
69
+ message: string;
70
+ cause: unknown;
71
+ stack: string | undefined;
72
+ info: string;
73
+ };
74
+ }
75
+
76
+ declare class InvalidConfigError extends Error {
77
+ readonly name = "Gateway_InvalidConfigError";
78
+ readonly info: string;
79
+ readonly cause: unknown;
80
+ constructor({ info, error }: {
81
+ info: string;
82
+ error: unknown;
83
+ });
84
+ static isInvalidConfigError(error: unknown): error is InvalidConfigError;
85
+ toJSON(): {
86
+ name: string;
87
+ message: string;
88
+ cause: unknown;
89
+ stack: string | undefined;
90
+ info: string;
91
+ };
92
+ }
93
+
94
+ declare class InvalidEndpointError extends Error {
95
+ readonly name = "Gateway_InvalidEndpointError";
96
+ readonly info: string;
97
+ readonly cause: unknown;
98
+ constructor({ info, error }: {
99
+ info: string;
100
+ error: unknown;
101
+ });
102
+ static isInvalidEndpointError(error: unknown): error is InvalidEndpointError;
103
+ toJSON(): {
104
+ name: string;
105
+ message: string;
106
+ cause: unknown;
107
+ stack: string | undefined;
108
+ info: string;
109
+ };
110
+ }
111
+
112
+ declare class InvalidMessagesError extends Error {
113
+ readonly name = "Gateway_InvalidMessagesError";
114
+ readonly info: string;
115
+ readonly cause: unknown;
116
+ constructor({ info, error }: {
117
+ info: string;
118
+ error: unknown;
119
+ });
120
+ static isInvalidMessagesError(error: unknown): error is InvalidMessagesError;
121
+ toJSON(): {
122
+ name: string;
123
+ message: string;
124
+ cause: unknown;
125
+ stack: string | undefined;
126
+ info: string;
127
+ };
128
+ }
129
+
130
+ declare class InvalidModalityError extends Error {
131
+ readonly name = "Gateway_InvalidModalityError";
132
+ readonly info: string;
133
+ readonly cause: unknown;
134
+ constructor({ info, error }: {
135
+ info: string;
136
+ error: unknown;
137
+ });
138
+ static isInvalidModalityError(error: unknown): error is InvalidModalityError;
139
+ toJSON(): {
140
+ name: string;
141
+ message: string;
142
+ cause: unknown;
143
+ stack: string | undefined;
144
+ info: string;
145
+ };
146
+ }
147
+
148
+ declare class InvalidModelError extends Error {
149
+ readonly name = "Gateway_InvalidModelError";
150
+ readonly info: string;
151
+ readonly cause: unknown;
152
+ constructor({ info, error }: {
153
+ info: string;
154
+ error: unknown;
155
+ });
156
+ static isInvalidModelError(error: unknown): error is InvalidModelError;
157
+ toJSON(): {
158
+ name: string;
159
+ message: string;
160
+ cause: unknown;
161
+ stack: string | undefined;
162
+ info: string;
163
+ };
164
+ }
165
+
166
+ declare class InvalidPromptError extends Error {
167
+ readonly name = "Gateway_InvalidPromptError";
168
+ readonly info: string;
169
+ readonly cause: unknown;
170
+ constructor({ info, error }: {
171
+ info: string;
172
+ error: unknown;
173
+ });
174
+ static isInvalidPromptError(error: unknown): error is InvalidPromptError;
175
+ toJSON(): {
176
+ name: string;
177
+ message: string;
178
+ cause: unknown;
179
+ stack: string | undefined;
180
+ info: string;
181
+ };
182
+ }
183
+
184
+ declare class InvalidRoleError extends Error {
185
+ readonly name = "Gateway_InvalidRoleError";
186
+ readonly info: string;
187
+ readonly cause: unknown;
188
+ constructor({ info, error }: {
189
+ info: string;
190
+ error: unknown;
191
+ });
192
+ static isInvalidRoleError(error: unknown): error is InvalidRoleError;
193
+ toJSON(): {
194
+ name: string;
195
+ message: string;
196
+ cause: unknown;
197
+ stack: string | undefined;
198
+ info: string;
199
+ };
200
+ }
201
+
202
+ declare class InvalidToolsError extends Error {
203
+ readonly name = "Gateway_InvalidToolsError";
204
+ readonly info: string;
205
+ readonly cause: unknown;
206
+ constructor({ info, error }: {
207
+ info: string;
208
+ error: unknown;
209
+ });
210
+ static isInvalidToolsError(error: unknown): error is InvalidToolsError;
211
+ toJSON(): {
212
+ name: string;
213
+ message: string;
214
+ cause: unknown;
215
+ stack: string | undefined;
216
+ info: string;
217
+ };
218
+ }
219
+
220
+ declare class InvalidEmbeddingRequestsError extends Error {
221
+ readonly name = "Gateway_InvalidEmbeddingRequestsError";
222
+ readonly info: string;
223
+ readonly cause: unknown;
224
+ constructor({ info, error }: {
225
+ info: string;
226
+ error: unknown;
227
+ });
228
+ static isInvalidEmbeddingRequestsError(error: unknown): error is InvalidEmbeddingRequestsError;
229
+ toJSON(): {
230
+ name: string;
231
+ message: string;
232
+ cause: unknown;
233
+ info: string;
234
+ stack: string | undefined;
235
+ };
236
+ }
237
+
238
+ declare class JsonParseError extends Error {
239
+ readonly name = "Gateway_JsonParseError";
240
+ readonly info: string;
241
+ readonly cause: unknown;
242
+ constructor({ info, error }: {
243
+ info: string;
244
+ error: unknown;
245
+ });
246
+ static isJsonParseError(error: unknown): error is JsonParseError;
247
+ toJSON(): {
248
+ name: string;
249
+ message: string;
250
+ cause: unknown;
251
+ stack: string | undefined;
252
+ info: string;
253
+ };
254
+ }
255
+
256
+ declare class ValidationError extends Error {
257
+ readonly name = "Gateway_ValidationError";
258
+ readonly info: string;
259
+ readonly cause: unknown;
260
+ constructor({ info, error }: {
261
+ info: string;
262
+ error: unknown;
263
+ });
264
+ static isValidationError(error: unknown): error is ValidationError;
265
+ toJSON(): {
266
+ name: string;
267
+ message: string;
268
+ cause: unknown;
269
+ stack: string | undefined;
270
+ info: string;
271
+ };
272
+ }
273
+
274
+ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.ZodEnum<["system", "user", "assistant", "tool"]>, M extends z.ZodEnum<[string, ...string[]]> = z.ZodEnum<["text", "image", "tool-call", "tool-response"]>>(Roles?: R, Modalities?: M) => z.ZodObject<{
275
+ name: z.ZodString;
276
+ description: z.ZodString;
277
+ roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>;
278
+ modalities: z.ZodArray<M, "atleastone">;
279
+ maxInputTokens: z.ZodNumber;
280
+ maxOutputTokens: z.ZodNumber;
281
+ config: z.ZodEffects<z.ZodObject<{
282
+ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
283
+ type: z.ZodLiteral<"range">;
284
+ param: z.ZodString;
285
+ title: z.ZodString;
286
+ description: z.ZodString;
287
+ min: z.ZodNumber;
288
+ max: z.ZodNumber;
289
+ step: z.ZodNumber;
290
+ default: z.ZodNumber;
291
+ }, "strip", z.ZodTypeAny, {
292
+ type: "range";
293
+ param: string;
294
+ title: string;
295
+ description: string;
296
+ max: number;
297
+ min: number;
298
+ step: number;
299
+ default: number;
300
+ }, {
301
+ type: "range";
302
+ param: string;
303
+ title: string;
304
+ description: string;
305
+ max: number;
306
+ min: number;
307
+ step: number;
308
+ default: number;
309
+ }>, z.ZodObject<{
310
+ type: z.ZodLiteral<"multi-string">;
311
+ param: z.ZodString;
312
+ title: z.ZodString;
313
+ description: z.ZodString;
314
+ max: z.ZodNumber;
315
+ }, "strip", z.ZodTypeAny, {
316
+ type: "multi-string";
317
+ param: string;
318
+ title: string;
319
+ description: string;
320
+ max: number;
321
+ }, {
322
+ type: "multi-string";
323
+ param: string;
324
+ title: string;
325
+ description: string;
326
+ max: number;
327
+ }>, z.ZodObject<{
328
+ type: z.ZodLiteral<"select-string">;
329
+ param: z.ZodString;
330
+ title: z.ZodString;
331
+ description: z.ZodString;
332
+ default: z.ZodString;
333
+ choices: z.ZodArray<z.ZodString, "many">;
334
+ }, "strip", z.ZodTypeAny, {
335
+ type: "select-string";
336
+ param: string;
337
+ title: string;
338
+ description: string;
339
+ default: string;
340
+ choices: string[];
341
+ }, {
342
+ type: "select-string";
343
+ param: string;
344
+ title: string;
345
+ description: string;
346
+ default: string;
347
+ choices: string[];
348
+ }>, z.ZodObject<{
349
+ type: z.ZodLiteral<"object-schema">;
350
+ param: z.ZodString;
351
+ title: z.ZodString;
352
+ description: z.ZodString;
353
+ objectSchema: z.ZodAny;
354
+ }, "strip", z.ZodTypeAny, {
355
+ type: "object-schema";
356
+ param: string;
357
+ title: string;
358
+ description: string;
359
+ objectSchema?: any;
360
+ }, {
361
+ type: "object-schema";
362
+ param: string;
363
+ title: string;
364
+ description: string;
365
+ objectSchema?: any;
366
+ }>]>>;
367
+ schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>;
368
+ }, "strip", z.ZodTypeAny, {
369
+ def: Record<string, {
370
+ type: "multi-string";
371
+ param: string;
372
+ title: string;
373
+ description: string;
374
+ max: number;
375
+ } | {
376
+ type: "range";
377
+ param: string;
378
+ title: string;
379
+ description: string;
380
+ max: number;
381
+ min: number;
382
+ step: number;
383
+ default: number;
384
+ } | {
385
+ type: "select-string";
386
+ param: string;
387
+ title: string;
388
+ description: string;
389
+ default: string;
390
+ choices: string[];
391
+ } | {
392
+ type: "object-schema";
393
+ param: string;
394
+ title: string;
395
+ description: string;
396
+ objectSchema?: any;
397
+ }>;
398
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
399
+ }, {
400
+ def: Record<string, {
401
+ type: "multi-string";
402
+ param: string;
403
+ title: string;
404
+ description: string;
405
+ max: number;
406
+ } | {
407
+ type: "range";
408
+ param: string;
409
+ title: string;
410
+ description: string;
411
+ max: number;
412
+ min: number;
413
+ step: number;
414
+ default: number;
415
+ } | {
416
+ type: "select-string";
417
+ param: string;
418
+ title: string;
419
+ description: string;
420
+ default: string;
421
+ choices: string[];
422
+ } | {
423
+ type: "object-schema";
424
+ param: string;
425
+ title: string;
426
+ description: string;
427
+ objectSchema?: any;
428
+ }>;
429
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
430
+ }>, {
431
+ def: Record<string, {
432
+ type: "multi-string";
433
+ param: string;
434
+ title: string;
435
+ description: string;
436
+ max: number;
437
+ } | {
438
+ type: "range";
439
+ param: string;
440
+ title: string;
441
+ description: string;
442
+ max: number;
443
+ min: number;
444
+ step: number;
445
+ default: number;
446
+ } | {
447
+ type: "select-string";
448
+ param: string;
449
+ title: string;
450
+ description: string;
451
+ default: string;
452
+ choices: string[];
453
+ } | {
454
+ type: "object-schema";
455
+ param: string;
456
+ title: string;
457
+ description: string;
458
+ objectSchema?: any;
459
+ }>;
460
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
461
+ }, {
462
+ def: Record<string, {
463
+ type: "multi-string";
464
+ param: string;
465
+ title: string;
466
+ description: string;
467
+ max: number;
468
+ } | {
469
+ type: "range";
470
+ param: string;
471
+ title: string;
472
+ description: string;
473
+ max: number;
474
+ min: number;
475
+ step: number;
476
+ default: number;
477
+ } | {
478
+ type: "select-string";
479
+ param: string;
480
+ title: string;
481
+ description: string;
482
+ default: string;
483
+ choices: string[];
484
+ } | {
485
+ type: "object-schema";
486
+ param: string;
487
+ title: string;
488
+ description: string;
489
+ objectSchema?: any;
490
+ }>;
491
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
492
+ }>;
493
+ }, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
494
+ name: z.ZodString;
495
+ description: z.ZodString;
496
+ roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>;
497
+ modalities: z.ZodArray<M, "atleastone">;
498
+ maxInputTokens: z.ZodNumber;
499
+ maxOutputTokens: z.ZodNumber;
500
+ config: z.ZodEffects<z.ZodObject<{
501
+ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
502
+ type: z.ZodLiteral<"range">;
503
+ param: z.ZodString;
504
+ title: z.ZodString;
505
+ description: z.ZodString;
506
+ min: z.ZodNumber;
507
+ max: z.ZodNumber;
508
+ step: z.ZodNumber;
509
+ default: z.ZodNumber;
510
+ }, "strip", z.ZodTypeAny, {
511
+ type: "range";
512
+ param: string;
513
+ title: string;
514
+ description: string;
515
+ max: number;
516
+ min: number;
517
+ step: number;
518
+ default: number;
519
+ }, {
520
+ type: "range";
521
+ param: string;
522
+ title: string;
523
+ description: string;
524
+ max: number;
525
+ min: number;
526
+ step: number;
527
+ default: number;
528
+ }>, z.ZodObject<{
529
+ type: z.ZodLiteral<"multi-string">;
530
+ param: z.ZodString;
531
+ title: z.ZodString;
532
+ description: z.ZodString;
533
+ max: z.ZodNumber;
534
+ }, "strip", z.ZodTypeAny, {
535
+ type: "multi-string";
536
+ param: string;
537
+ title: string;
538
+ description: string;
539
+ max: number;
540
+ }, {
541
+ type: "multi-string";
542
+ param: string;
543
+ title: string;
544
+ description: string;
545
+ max: number;
546
+ }>, z.ZodObject<{
547
+ type: z.ZodLiteral<"select-string">;
548
+ param: z.ZodString;
549
+ title: z.ZodString;
550
+ description: z.ZodString;
551
+ default: z.ZodString;
552
+ choices: z.ZodArray<z.ZodString, "many">;
553
+ }, "strip", z.ZodTypeAny, {
554
+ type: "select-string";
555
+ param: string;
556
+ title: string;
557
+ description: string;
558
+ default: string;
559
+ choices: string[];
560
+ }, {
561
+ type: "select-string";
562
+ param: string;
563
+ title: string;
564
+ description: string;
565
+ default: string;
566
+ choices: string[];
567
+ }>, z.ZodObject<{
568
+ type: z.ZodLiteral<"object-schema">;
569
+ param: z.ZodString;
570
+ title: z.ZodString;
571
+ description: z.ZodString;
572
+ objectSchema: z.ZodAny;
573
+ }, "strip", z.ZodTypeAny, {
574
+ type: "object-schema";
575
+ param: string;
576
+ title: string;
577
+ description: string;
578
+ objectSchema?: any;
579
+ }, {
580
+ type: "object-schema";
581
+ param: string;
582
+ title: string;
583
+ description: string;
584
+ objectSchema?: any;
585
+ }>]>>;
586
+ schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>;
587
+ }, "strip", z.ZodTypeAny, {
588
+ def: Record<string, {
589
+ type: "multi-string";
590
+ param: string;
591
+ title: string;
592
+ description: string;
593
+ max: number;
594
+ } | {
595
+ type: "range";
596
+ param: string;
597
+ title: string;
598
+ description: string;
599
+ max: number;
600
+ min: number;
601
+ step: number;
602
+ default: number;
603
+ } | {
604
+ type: "select-string";
605
+ param: string;
606
+ title: string;
607
+ description: string;
608
+ default: string;
609
+ choices: string[];
610
+ } | {
611
+ type: "object-schema";
612
+ param: string;
613
+ title: string;
614
+ description: string;
615
+ objectSchema?: any;
616
+ }>;
617
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
618
+ }, {
619
+ def: Record<string, {
620
+ type: "multi-string";
621
+ param: string;
622
+ title: string;
623
+ description: string;
624
+ max: number;
625
+ } | {
626
+ type: "range";
627
+ param: string;
628
+ title: string;
629
+ description: string;
630
+ max: number;
631
+ min: number;
632
+ step: number;
633
+ default: number;
634
+ } | {
635
+ type: "select-string";
636
+ param: string;
637
+ title: string;
638
+ description: string;
639
+ default: string;
640
+ choices: string[];
641
+ } | {
642
+ type: "object-schema";
643
+ param: string;
644
+ title: string;
645
+ description: string;
646
+ objectSchema?: any;
647
+ }>;
648
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
649
+ }>, {
650
+ def: Record<string, {
651
+ type: "multi-string";
652
+ param: string;
653
+ title: string;
654
+ description: string;
655
+ max: number;
656
+ } | {
657
+ type: "range";
658
+ param: string;
659
+ title: string;
660
+ description: string;
661
+ max: number;
662
+ min: number;
663
+ step: number;
664
+ default: number;
665
+ } | {
666
+ type: "select-string";
667
+ param: string;
668
+ title: string;
669
+ description: string;
670
+ default: string;
671
+ choices: string[];
672
+ } | {
673
+ type: "object-schema";
674
+ param: string;
675
+ title: string;
676
+ description: string;
677
+ objectSchema?: any;
678
+ }>;
679
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
680
+ }, {
681
+ def: Record<string, {
682
+ type: "multi-string";
683
+ param: string;
684
+ title: string;
685
+ description: string;
686
+ max: number;
687
+ } | {
688
+ type: "range";
689
+ param: string;
690
+ title: string;
691
+ description: string;
692
+ max: number;
693
+ min: number;
694
+ step: number;
695
+ default: number;
696
+ } | {
697
+ type: "select-string";
698
+ param: string;
699
+ title: string;
700
+ description: string;
701
+ default: string;
702
+ choices: string[];
703
+ } | {
704
+ type: "object-schema";
705
+ param: string;
706
+ title: string;
707
+ description: string;
708
+ objectSchema?: any;
709
+ }>;
710
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
711
+ }>;
712
+ }>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
713
+ name: z.ZodString;
714
+ description: z.ZodString;
715
+ roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>;
716
+ modalities: z.ZodArray<M, "atleastone">;
717
+ maxInputTokens: z.ZodNumber;
718
+ maxOutputTokens: z.ZodNumber;
719
+ config: z.ZodEffects<z.ZodObject<{
720
+ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
721
+ type: z.ZodLiteral<"range">;
722
+ param: z.ZodString;
723
+ title: z.ZodString;
724
+ description: z.ZodString;
725
+ min: z.ZodNumber;
726
+ max: z.ZodNumber;
727
+ step: z.ZodNumber;
728
+ default: z.ZodNumber;
729
+ }, "strip", z.ZodTypeAny, {
730
+ type: "range";
731
+ param: string;
732
+ title: string;
733
+ description: string;
734
+ max: number;
735
+ min: number;
736
+ step: number;
737
+ default: number;
738
+ }, {
739
+ type: "range";
740
+ param: string;
741
+ title: string;
742
+ description: string;
743
+ max: number;
744
+ min: number;
745
+ step: number;
746
+ default: number;
747
+ }>, z.ZodObject<{
748
+ type: z.ZodLiteral<"multi-string">;
749
+ param: z.ZodString;
750
+ title: z.ZodString;
751
+ description: z.ZodString;
752
+ max: z.ZodNumber;
753
+ }, "strip", z.ZodTypeAny, {
754
+ type: "multi-string";
755
+ param: string;
756
+ title: string;
757
+ description: string;
758
+ max: number;
759
+ }, {
760
+ type: "multi-string";
761
+ param: string;
762
+ title: string;
763
+ description: string;
764
+ max: number;
765
+ }>, z.ZodObject<{
766
+ type: z.ZodLiteral<"select-string">;
767
+ param: z.ZodString;
768
+ title: z.ZodString;
769
+ description: z.ZodString;
770
+ default: z.ZodString;
771
+ choices: z.ZodArray<z.ZodString, "many">;
772
+ }, "strip", z.ZodTypeAny, {
773
+ type: "select-string";
774
+ param: string;
775
+ title: string;
776
+ description: string;
777
+ default: string;
778
+ choices: string[];
779
+ }, {
780
+ type: "select-string";
781
+ param: string;
782
+ title: string;
783
+ description: string;
784
+ default: string;
785
+ choices: string[];
786
+ }>, z.ZodObject<{
787
+ type: z.ZodLiteral<"object-schema">;
788
+ param: z.ZodString;
789
+ title: z.ZodString;
790
+ description: z.ZodString;
791
+ objectSchema: z.ZodAny;
792
+ }, "strip", z.ZodTypeAny, {
793
+ type: "object-schema";
794
+ param: string;
795
+ title: string;
796
+ description: string;
797
+ objectSchema?: any;
798
+ }, {
799
+ type: "object-schema";
800
+ param: string;
801
+ title: string;
802
+ description: string;
803
+ objectSchema?: any;
804
+ }>]>>;
805
+ schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>;
806
+ }, "strip", z.ZodTypeAny, {
807
+ def: Record<string, {
808
+ type: "multi-string";
809
+ param: string;
810
+ title: string;
811
+ description: string;
812
+ max: number;
813
+ } | {
814
+ type: "range";
815
+ param: string;
816
+ title: string;
817
+ description: string;
818
+ max: number;
819
+ min: number;
820
+ step: number;
821
+ default: number;
822
+ } | {
823
+ type: "select-string";
824
+ param: string;
825
+ title: string;
826
+ description: string;
827
+ default: string;
828
+ choices: string[];
829
+ } | {
830
+ type: "object-schema";
831
+ param: string;
832
+ title: string;
833
+ description: string;
834
+ objectSchema?: any;
835
+ }>;
836
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
837
+ }, {
838
+ def: Record<string, {
839
+ type: "multi-string";
840
+ param: string;
841
+ title: string;
842
+ description: string;
843
+ max: number;
844
+ } | {
845
+ type: "range";
846
+ param: string;
847
+ title: string;
848
+ description: string;
849
+ max: number;
850
+ min: number;
851
+ step: number;
852
+ default: number;
853
+ } | {
854
+ type: "select-string";
855
+ param: string;
856
+ title: string;
857
+ description: string;
858
+ default: string;
859
+ choices: string[];
860
+ } | {
861
+ type: "object-schema";
862
+ param: string;
863
+ title: string;
864
+ description: string;
865
+ objectSchema?: any;
866
+ }>;
867
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
868
+ }>, {
869
+ def: Record<string, {
870
+ type: "multi-string";
871
+ param: string;
872
+ title: string;
873
+ description: string;
874
+ max: number;
875
+ } | {
876
+ type: "range";
877
+ param: string;
878
+ title: string;
879
+ description: string;
880
+ max: number;
881
+ min: number;
882
+ step: number;
883
+ default: number;
884
+ } | {
885
+ type: "select-string";
886
+ param: string;
887
+ title: string;
888
+ description: string;
889
+ default: string;
890
+ choices: string[];
891
+ } | {
892
+ type: "object-schema";
893
+ param: string;
894
+ title: string;
895
+ description: string;
896
+ objectSchema?: any;
897
+ }>;
898
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
899
+ }, {
900
+ def: Record<string, {
901
+ type: "multi-string";
902
+ param: string;
903
+ title: string;
904
+ description: string;
905
+ max: number;
906
+ } | {
907
+ type: "range";
908
+ param: string;
909
+ title: string;
910
+ description: string;
911
+ max: number;
912
+ min: number;
913
+ step: number;
914
+ default: number;
915
+ } | {
916
+ type: "select-string";
917
+ param: string;
918
+ title: string;
919
+ description: string;
920
+ default: string;
921
+ choices: string[];
922
+ } | {
923
+ type: "object-schema";
924
+ param: string;
925
+ title: string;
926
+ description: string;
927
+ objectSchema?: any;
928
+ }>;
929
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
930
+ }>;
931
+ }>, any>[k]; }, { [k_1 in keyof z.baseObjectInputType<{
932
+ name: z.ZodString;
933
+ description: z.ZodString;
934
+ roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>;
935
+ modalities: z.ZodArray<M, "atleastone">;
936
+ maxInputTokens: z.ZodNumber;
937
+ maxOutputTokens: z.ZodNumber;
938
+ config: z.ZodEffects<z.ZodObject<{
939
+ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
940
+ type: z.ZodLiteral<"range">;
941
+ param: z.ZodString;
942
+ title: z.ZodString;
943
+ description: z.ZodString;
944
+ min: z.ZodNumber;
945
+ max: z.ZodNumber;
946
+ step: z.ZodNumber;
947
+ default: z.ZodNumber;
948
+ }, "strip", z.ZodTypeAny, {
949
+ type: "range";
950
+ param: string;
951
+ title: string;
952
+ description: string;
953
+ max: number;
954
+ min: number;
955
+ step: number;
956
+ default: number;
957
+ }, {
958
+ type: "range";
959
+ param: string;
960
+ title: string;
961
+ description: string;
962
+ max: number;
963
+ min: number;
964
+ step: number;
965
+ default: number;
966
+ }>, z.ZodObject<{
967
+ type: z.ZodLiteral<"multi-string">;
968
+ param: z.ZodString;
969
+ title: z.ZodString;
970
+ description: z.ZodString;
971
+ max: z.ZodNumber;
972
+ }, "strip", z.ZodTypeAny, {
973
+ type: "multi-string";
974
+ param: string;
975
+ title: string;
976
+ description: string;
977
+ max: number;
978
+ }, {
979
+ type: "multi-string";
980
+ param: string;
981
+ title: string;
982
+ description: string;
983
+ max: number;
984
+ }>, z.ZodObject<{
985
+ type: z.ZodLiteral<"select-string">;
986
+ param: z.ZodString;
987
+ title: z.ZodString;
988
+ description: z.ZodString;
989
+ default: z.ZodString;
990
+ choices: z.ZodArray<z.ZodString, "many">;
991
+ }, "strip", z.ZodTypeAny, {
992
+ type: "select-string";
993
+ param: string;
994
+ title: string;
995
+ description: string;
996
+ default: string;
997
+ choices: string[];
998
+ }, {
999
+ type: "select-string";
1000
+ param: string;
1001
+ title: string;
1002
+ description: string;
1003
+ default: string;
1004
+ choices: string[];
1005
+ }>, z.ZodObject<{
1006
+ type: z.ZodLiteral<"object-schema">;
1007
+ param: z.ZodString;
1008
+ title: z.ZodString;
1009
+ description: z.ZodString;
1010
+ objectSchema: z.ZodAny;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ type: "object-schema";
1013
+ param: string;
1014
+ title: string;
1015
+ description: string;
1016
+ objectSchema?: any;
1017
+ }, {
1018
+ type: "object-schema";
1019
+ param: string;
1020
+ title: string;
1021
+ description: string;
1022
+ objectSchema?: any;
1023
+ }>]>>;
1024
+ schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>;
1025
+ }, "strip", z.ZodTypeAny, {
1026
+ def: Record<string, {
1027
+ type: "multi-string";
1028
+ param: string;
1029
+ title: string;
1030
+ description: string;
1031
+ max: number;
1032
+ } | {
1033
+ type: "range";
1034
+ param: string;
1035
+ title: string;
1036
+ description: string;
1037
+ max: number;
1038
+ min: number;
1039
+ step: number;
1040
+ default: number;
1041
+ } | {
1042
+ type: "select-string";
1043
+ param: string;
1044
+ title: string;
1045
+ description: string;
1046
+ default: string;
1047
+ choices: string[];
1048
+ } | {
1049
+ type: "object-schema";
1050
+ param: string;
1051
+ title: string;
1052
+ description: string;
1053
+ objectSchema?: any;
1054
+ }>;
1055
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1056
+ }, {
1057
+ def: Record<string, {
1058
+ type: "multi-string";
1059
+ param: string;
1060
+ title: string;
1061
+ description: string;
1062
+ max: number;
1063
+ } | {
1064
+ type: "range";
1065
+ param: string;
1066
+ title: string;
1067
+ description: string;
1068
+ max: number;
1069
+ min: number;
1070
+ step: number;
1071
+ default: number;
1072
+ } | {
1073
+ type: "select-string";
1074
+ param: string;
1075
+ title: string;
1076
+ description: string;
1077
+ default: string;
1078
+ choices: string[];
1079
+ } | {
1080
+ type: "object-schema";
1081
+ param: string;
1082
+ title: string;
1083
+ description: string;
1084
+ objectSchema?: any;
1085
+ }>;
1086
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1087
+ }>, {
1088
+ def: Record<string, {
1089
+ type: "multi-string";
1090
+ param: string;
1091
+ title: string;
1092
+ description: string;
1093
+ max: number;
1094
+ } | {
1095
+ type: "range";
1096
+ param: string;
1097
+ title: string;
1098
+ description: string;
1099
+ max: number;
1100
+ min: number;
1101
+ step: number;
1102
+ default: number;
1103
+ } | {
1104
+ type: "select-string";
1105
+ param: string;
1106
+ title: string;
1107
+ description: string;
1108
+ default: string;
1109
+ choices: string[];
1110
+ } | {
1111
+ type: "object-schema";
1112
+ param: string;
1113
+ title: string;
1114
+ description: string;
1115
+ objectSchema?: any;
1116
+ }>;
1117
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1118
+ }, {
1119
+ def: Record<string, {
1120
+ type: "multi-string";
1121
+ param: string;
1122
+ title: string;
1123
+ description: string;
1124
+ max: number;
1125
+ } | {
1126
+ type: "range";
1127
+ param: string;
1128
+ title: string;
1129
+ description: string;
1130
+ max: number;
1131
+ min: number;
1132
+ step: number;
1133
+ default: number;
1134
+ } | {
1135
+ type: "select-string";
1136
+ param: string;
1137
+ title: string;
1138
+ description: string;
1139
+ default: string;
1140
+ choices: string[];
1141
+ } | {
1142
+ type: "object-schema";
1143
+ param: string;
1144
+ title: string;
1145
+ description: string;
1146
+ objectSchema?: any;
1147
+ }>;
1148
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1149
+ }>;
1150
+ }>]: z.baseObjectInputType<{
1151
+ name: z.ZodString;
1152
+ description: z.ZodString;
1153
+ roles: z.ZodRecord<R, z.ZodOptional<z.ZodString>>;
1154
+ modalities: z.ZodArray<M, "atleastone">;
1155
+ maxInputTokens: z.ZodNumber;
1156
+ maxOutputTokens: z.ZodNumber;
1157
+ config: z.ZodEffects<z.ZodObject<{
1158
+ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1159
+ type: z.ZodLiteral<"range">;
1160
+ param: z.ZodString;
1161
+ title: z.ZodString;
1162
+ description: z.ZodString;
1163
+ min: z.ZodNumber;
1164
+ max: z.ZodNumber;
1165
+ step: z.ZodNumber;
1166
+ default: z.ZodNumber;
1167
+ }, "strip", z.ZodTypeAny, {
1168
+ type: "range";
1169
+ param: string;
1170
+ title: string;
1171
+ description: string;
1172
+ max: number;
1173
+ min: number;
1174
+ step: number;
1175
+ default: number;
1176
+ }, {
1177
+ type: "range";
1178
+ param: string;
1179
+ title: string;
1180
+ description: string;
1181
+ max: number;
1182
+ min: number;
1183
+ step: number;
1184
+ default: number;
1185
+ }>, z.ZodObject<{
1186
+ type: z.ZodLiteral<"multi-string">;
1187
+ param: z.ZodString;
1188
+ title: z.ZodString;
1189
+ description: z.ZodString;
1190
+ max: z.ZodNumber;
1191
+ }, "strip", z.ZodTypeAny, {
1192
+ type: "multi-string";
1193
+ param: string;
1194
+ title: string;
1195
+ description: string;
1196
+ max: number;
1197
+ }, {
1198
+ type: "multi-string";
1199
+ param: string;
1200
+ title: string;
1201
+ description: string;
1202
+ max: number;
1203
+ }>, z.ZodObject<{
1204
+ type: z.ZodLiteral<"select-string">;
1205
+ param: z.ZodString;
1206
+ title: z.ZodString;
1207
+ description: z.ZodString;
1208
+ default: z.ZodString;
1209
+ choices: z.ZodArray<z.ZodString, "many">;
1210
+ }, "strip", z.ZodTypeAny, {
1211
+ type: "select-string";
1212
+ param: string;
1213
+ title: string;
1214
+ description: string;
1215
+ default: string;
1216
+ choices: string[];
1217
+ }, {
1218
+ type: "select-string";
1219
+ param: string;
1220
+ title: string;
1221
+ description: string;
1222
+ default: string;
1223
+ choices: string[];
1224
+ }>, z.ZodObject<{
1225
+ type: z.ZodLiteral<"object-schema">;
1226
+ param: z.ZodString;
1227
+ title: z.ZodString;
1228
+ description: z.ZodString;
1229
+ objectSchema: z.ZodAny;
1230
+ }, "strip", z.ZodTypeAny, {
1231
+ type: "object-schema";
1232
+ param: string;
1233
+ title: string;
1234
+ description: string;
1235
+ objectSchema?: any;
1236
+ }, {
1237
+ type: "object-schema";
1238
+ param: string;
1239
+ title: string;
1240
+ description: string;
1241
+ objectSchema?: any;
1242
+ }>]>>;
1243
+ schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>;
1244
+ }, "strip", z.ZodTypeAny, {
1245
+ def: Record<string, {
1246
+ type: "multi-string";
1247
+ param: string;
1248
+ title: string;
1249
+ description: string;
1250
+ max: number;
1251
+ } | {
1252
+ type: "range";
1253
+ param: string;
1254
+ title: string;
1255
+ description: string;
1256
+ max: number;
1257
+ min: number;
1258
+ step: number;
1259
+ default: number;
1260
+ } | {
1261
+ type: "select-string";
1262
+ param: string;
1263
+ title: string;
1264
+ description: string;
1265
+ default: string;
1266
+ choices: string[];
1267
+ } | {
1268
+ type: "object-schema";
1269
+ param: string;
1270
+ title: string;
1271
+ description: string;
1272
+ objectSchema?: any;
1273
+ }>;
1274
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1275
+ }, {
1276
+ def: Record<string, {
1277
+ type: "multi-string";
1278
+ param: string;
1279
+ title: string;
1280
+ description: string;
1281
+ max: number;
1282
+ } | {
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
+ type: "select-string";
1293
+ param: string;
1294
+ title: string;
1295
+ description: string;
1296
+ default: string;
1297
+ choices: string[];
1298
+ } | {
1299
+ type: "object-schema";
1300
+ param: string;
1301
+ title: string;
1302
+ description: string;
1303
+ objectSchema?: any;
1304
+ }>;
1305
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1306
+ }>, {
1307
+ def: Record<string, {
1308
+ type: "multi-string";
1309
+ param: string;
1310
+ title: string;
1311
+ description: string;
1312
+ max: number;
1313
+ } | {
1314
+ type: "range";
1315
+ param: string;
1316
+ title: string;
1317
+ description: string;
1318
+ max: number;
1319
+ min: number;
1320
+ step: number;
1321
+ default: number;
1322
+ } | {
1323
+ type: "select-string";
1324
+ param: string;
1325
+ title: string;
1326
+ description: string;
1327
+ default: string;
1328
+ choices: string[];
1329
+ } | {
1330
+ type: "object-schema";
1331
+ param: string;
1332
+ title: string;
1333
+ description: string;
1334
+ objectSchema?: any;
1335
+ }>;
1336
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1337
+ }, {
1338
+ def: Record<string, {
1339
+ type: "multi-string";
1340
+ param: string;
1341
+ title: string;
1342
+ description: string;
1343
+ max: number;
1344
+ } | {
1345
+ type: "range";
1346
+ param: string;
1347
+ title: string;
1348
+ description: string;
1349
+ max: number;
1350
+ min: number;
1351
+ step: number;
1352
+ default: number;
1353
+ } | {
1354
+ type: "select-string";
1355
+ param: string;
1356
+ title: string;
1357
+ description: string;
1358
+ default: string;
1359
+ choices: string[];
1360
+ } | {
1361
+ type: "object-schema";
1362
+ param: string;
1363
+ title: string;
1364
+ description: string;
1365
+ objectSchema?: any;
1366
+ }>;
1367
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1368
+ }>;
1369
+ }>[k_1]; }>;
1370
+ type ChatModelSchemaType<R extends z.ZodEnum<[string, ...string[]]> = typeof RoleEnum, M extends z.ZodEnum<[string, ...string[]]> = typeof ModalityEnum> = z.infer<ReturnType<typeof ChatModelSchema<R, M>>>;
1371
+
1372
+ declare const Headers: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>;
1373
+ type HeadersType = z.infer<typeof Headers>;
1374
+
1375
+ declare const Params: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodNumber, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodArray<z.ZodAny, "many">, z.ZodNull, z.ZodUndefined]>>;
1376
+ type ParamsType = z.infer<typeof Params>;
1377
+
1378
+ declare const Url: z.ZodString;
1379
+ type UrlType = z.infer<typeof Url>;
1380
+
1381
+ declare const ConfigItemLiterals: readonly ["range", "multi-string", "select-string", "object-schema"];
1382
+ declare const ConfigItemEnum: z.ZodEnum<["range", "multi-string", "select-string", "object-schema"]>;
1383
+ type ConfigItemEnumType = z.infer<typeof ConfigItemEnum>;
1384
+ declare const ConfigItemDef: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1385
+ type: z.ZodLiteral<"range">;
1386
+ param: z.ZodString;
1387
+ title: z.ZodString;
1388
+ description: z.ZodString;
1389
+ min: z.ZodNumber;
1390
+ max: z.ZodNumber;
1391
+ step: z.ZodNumber;
1392
+ default: z.ZodNumber;
1393
+ }, "strip", z.ZodTypeAny, {
1394
+ type: "range";
1395
+ param: string;
1396
+ title: string;
1397
+ description: string;
1398
+ max: number;
1399
+ min: number;
1400
+ step: number;
1401
+ default: number;
1402
+ }, {
1403
+ type: "range";
1404
+ param: string;
1405
+ title: string;
1406
+ description: string;
1407
+ max: number;
1408
+ min: number;
1409
+ step: number;
1410
+ default: number;
1411
+ }>, z.ZodObject<{
1412
+ type: z.ZodLiteral<"multi-string">;
1413
+ param: z.ZodString;
1414
+ title: z.ZodString;
1415
+ description: z.ZodString;
1416
+ max: z.ZodNumber;
1417
+ }, "strip", z.ZodTypeAny, {
1418
+ type: "multi-string";
1419
+ param: string;
1420
+ title: string;
1421
+ description: string;
1422
+ max: number;
1423
+ }, {
1424
+ type: "multi-string";
1425
+ param: string;
1426
+ title: string;
1427
+ description: string;
1428
+ max: number;
1429
+ }>, z.ZodObject<{
1430
+ type: z.ZodLiteral<"select-string">;
1431
+ param: z.ZodString;
1432
+ title: z.ZodString;
1433
+ description: z.ZodString;
1434
+ default: z.ZodString;
1435
+ choices: z.ZodArray<z.ZodString, "many">;
1436
+ }, "strip", z.ZodTypeAny, {
1437
+ type: "select-string";
1438
+ param: string;
1439
+ title: string;
1440
+ description: string;
1441
+ default: string;
1442
+ choices: string[];
1443
+ }, {
1444
+ type: "select-string";
1445
+ param: string;
1446
+ title: string;
1447
+ description: string;
1448
+ default: string;
1449
+ choices: string[];
1450
+ }>, z.ZodObject<{
1451
+ type: z.ZodLiteral<"object-schema">;
1452
+ param: z.ZodString;
1453
+ title: z.ZodString;
1454
+ description: z.ZodString;
1455
+ objectSchema: z.ZodAny;
1456
+ }, "strip", z.ZodTypeAny, {
1457
+ type: "object-schema";
1458
+ param: string;
1459
+ title: string;
1460
+ description: string;
1461
+ objectSchema?: any;
1462
+ }, {
1463
+ type: "object-schema";
1464
+ param: string;
1465
+ title: string;
1466
+ description: string;
1467
+ objectSchema?: any;
1468
+ }>]>;
1469
+ type ConfigItemDefType = z.infer<typeof ConfigItemDef>;
1470
+
1471
+ declare const MultiStringConfigItemTypeLiteral: "multi-string";
1472
+ declare const MultiStringConfigItemDef: z.ZodObject<{
1473
+ type: z.ZodLiteral<"multi-string">;
1474
+ param: z.ZodString;
1475
+ title: z.ZodString;
1476
+ description: z.ZodString;
1477
+ max: z.ZodNumber;
1478
+ }, "strip", z.ZodTypeAny, {
1479
+ type: "multi-string";
1480
+ param: string;
1481
+ title: string;
1482
+ description: string;
1483
+ max: number;
1484
+ }, {
1485
+ type: "multi-string";
1486
+ param: string;
1487
+ title: string;
1488
+ description: string;
1489
+ max: number;
1490
+ }>;
1491
+ type MultiStringConfigItemType = z.infer<typeof MultiStringConfigItemDef>;
1492
+ declare const MultiStringConfigItemSchema: (max: number) => z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1493
+ type MultiStringConfigItemSchemaType = z.infer<ReturnType<typeof MultiStringConfigItemSchema>>;
1494
+ declare const MultiStringConfigItem: (data: Omit<MultiStringConfigItemType, "type">) => {
1495
+ def: {
1496
+ type: "multi-string";
1497
+ param: string;
1498
+ title: string;
1499
+ description: string;
1500
+ max: number;
1501
+ };
1502
+ schema: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1503
+ };
1504
+
1505
+ declare const RangeConfigItemTypeLiteral: "range";
1506
+ declare const RangeConfigItemDef: z.ZodObject<{
1507
+ type: z.ZodLiteral<"range">;
1508
+ param: z.ZodString;
1509
+ title: z.ZodString;
1510
+ description: z.ZodString;
1511
+ min: z.ZodNumber;
1512
+ max: z.ZodNumber;
1513
+ step: z.ZodNumber;
1514
+ default: z.ZodNumber;
1515
+ }, "strip", z.ZodTypeAny, {
1516
+ type: "range";
1517
+ param: string;
1518
+ title: string;
1519
+ description: string;
1520
+ max: number;
1521
+ min: number;
1522
+ step: number;
1523
+ default: number;
1524
+ }, {
1525
+ type: "range";
1526
+ param: string;
1527
+ title: string;
1528
+ description: string;
1529
+ max: number;
1530
+ min: number;
1531
+ step: number;
1532
+ default: number;
1533
+ }>;
1534
+ type RangeConfigItemDefType = z.infer<typeof RangeConfigItemDef>;
1535
+ declare const RangeConfigItemSchema: (min: number, max: number, step: number, defaultValue: number) => z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1536
+ type RangeConfigItemSchemaType = z.infer<ReturnType<typeof RangeConfigItemSchema>>;
1537
+ declare const RangeConfigItem: (data: Omit<RangeConfigItemDefType, "type">) => {
1538
+ def: {
1539
+ type: "range";
1540
+ param: string;
1541
+ title: string;
1542
+ description: string;
1543
+ max: number;
1544
+ min: number;
1545
+ step: number;
1546
+ default: number;
1547
+ };
1548
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
1549
+ };
1550
+
1551
+ declare const SelectStringConfigItemTypeLiteral: "select-string";
1552
+ declare const SelectStringConfigItemDef: z.ZodObject<{
1553
+ type: z.ZodLiteral<"select-string">;
1554
+ param: z.ZodString;
1555
+ title: z.ZodString;
1556
+ description: z.ZodString;
1557
+ default: z.ZodString;
1558
+ choices: z.ZodArray<z.ZodString, "many">;
1559
+ }, "strip", z.ZodTypeAny, {
1560
+ type: "select-string";
1561
+ param: string;
1562
+ title: string;
1563
+ description: string;
1564
+ default: string;
1565
+ choices: string[];
1566
+ }, {
1567
+ type: "select-string";
1568
+ param: string;
1569
+ title: string;
1570
+ description: string;
1571
+ default: string;
1572
+ choices: string[];
1573
+ }>;
1574
+ type SelectStringConfigItemDefType = z.infer<typeof SelectStringConfigItemDef>;
1575
+ declare const SelectStringConfigItemSchema: (defaultValue: string, choices: string[]) => z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
1576
+ type SelectStringConfigItemSchemaType = z.infer<ReturnType<typeof SelectStringConfigItemSchema>>;
1577
+ declare const SelectStringConfigItem: (data: Omit<SelectStringConfigItemDefType, "type">) => {
1578
+ def: {
1579
+ type: "select-string";
1580
+ param: string;
1581
+ title: string;
1582
+ description: string;
1583
+ default: string;
1584
+ choices: string[];
1585
+ };
1586
+ schema: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
1587
+ };
1588
+
1589
+ declare const ObjectSchemaConfigItemTypeLiteral: "object-schema";
1590
+ declare const ObjectSchemaConfigItemDef: z.ZodObject<{
1591
+ type: z.ZodLiteral<"object-schema">;
1592
+ param: z.ZodString;
1593
+ title: z.ZodString;
1594
+ description: z.ZodString;
1595
+ objectSchema: z.ZodAny;
1596
+ }, "strip", z.ZodTypeAny, {
1597
+ type: "object-schema";
1598
+ param: string;
1599
+ title: string;
1600
+ description: string;
1601
+ objectSchema?: any;
1602
+ }, {
1603
+ type: "object-schema";
1604
+ param: string;
1605
+ title: string;
1606
+ description: string;
1607
+ objectSchema?: any;
1608
+ }>;
1609
+ type ObjectSchemaConfigItemType = z.infer<typeof ObjectSchemaConfigItemDef>;
1610
+ declare const ObjectSchemaConfigItemSchema: <S extends z.ZodRawShape>(schema: z.ZodObject<S>) => z.ZodObject<S, z.UnknownKeysParam, z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<S>, any> extends infer T ? { [k in keyof T]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<S>, any>[k]; } : never, z.baseObjectInputType<S> extends infer T_1 ? { [k_1 in keyof T_1]: z.baseObjectInputType<S>[k_1]; } : never>;
1611
+ type ObjectSchemaConfigItemSchemaType<S extends z.ZodRawShape = z.ZodRawShape> = z.infer<ReturnType<typeof ObjectSchemaConfigItemSchema<S>>>;
1612
+ declare const ObjectSchemaConfigItem: (data: Omit<ObjectSchemaConfigItemType, "type">) => {
1613
+ def: {
1614
+ type: "object-schema";
1615
+ param: string;
1616
+ title: string;
1617
+ description: string;
1618
+ objectSchema?: any;
1619
+ };
1620
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
1621
+ [x: string]: any;
1622
+ }, {
1623
+ [x: string]: any;
1624
+ }>;
1625
+ };
1626
+
1627
+ interface ChatModelV1<MS extends ChatModelSchemaType = ChatModelSchemaType> {
1628
+ readonly version: "v1";
1629
+ readonly modelSchema: MS;
1630
+ getTokenCount: (messages: MessageType[]) => number;
1631
+ getDefaultBaseUrl: () => UrlType;
1632
+ getDefaultHeaders: () => HeadersType;
1633
+ getDefaultParams: () => ParamsType;
1634
+ transformConfig: (config: ConfigType, messages?: MessageType[], tools?: ToolType[]) => ParamsType;
1635
+ transformMessages: (messages: MessageType[]) => ParamsType;
1636
+ transformTools: (tools: ToolType[]) => ParamsType;
1637
+ getCompleteChatUrl: (config: ConfigType, messages: MessageType[], tools?: ToolType[]) => UrlType;
1638
+ getCompleteChatHeaders: (config: ConfigType, messages: MessageType[], tools?: ToolType[]) => HeadersType;
1639
+ getCompleteChatData: (config: ConfigType, messages: MessageType[], tools?: ToolType[]) => ParamsType;
1640
+ transformCompleteChatResponse: (response: any) => MessageType[];
1641
+ getStreamChatUrl: (config: ConfigType, messages: MessageType[], tools?: ToolType[]) => UrlType;
1642
+ getStreamChatHeaders: (config: ConfigType, messages: MessageType[], tools?: ToolType[]) => HeadersType;
1643
+ getStreamChatData: (config: ConfigType, messages: MessageType[], tools?: ToolType[]) => ParamsType;
1644
+ transformStreamChatResponseChunk: (chunk: string, buffer: string) => AsyncGenerator<{
1645
+ partialMessages: PartialMessageType[];
1646
+ buffer: string;
1647
+ }>;
1648
+ }
1649
+
1650
+ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]> = z.ZodEnum<["text", "token"]>>(Modalities?: M) => z.ZodObject<{
1651
+ name: z.ZodString;
1652
+ description: z.ZodString;
1653
+ modalities: z.ZodArray<M, "atleastone">;
1654
+ maxInputTokens: z.ZodNumber;
1655
+ maxOutputTokens: z.ZodNumber;
1656
+ config: z.ZodEffects<z.ZodObject<{
1657
+ def: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1658
+ type: z.ZodLiteral<"range">;
1659
+ param: z.ZodString;
1660
+ title: z.ZodString;
1661
+ description: z.ZodString;
1662
+ min: z.ZodNumber;
1663
+ max: z.ZodNumber;
1664
+ step: z.ZodNumber;
1665
+ default: z.ZodNumber;
1666
+ }, "strip", z.ZodTypeAny, {
1667
+ type: "range";
1668
+ param: string;
1669
+ title: string;
1670
+ description: string;
1671
+ max: number;
1672
+ min: number;
1673
+ step: number;
1674
+ default: number;
1675
+ }, {
1676
+ type: "range";
1677
+ param: string;
1678
+ title: string;
1679
+ description: string;
1680
+ max: number;
1681
+ min: number;
1682
+ step: number;
1683
+ default: number;
1684
+ }>, z.ZodObject<{
1685
+ type: z.ZodLiteral<"multi-string">;
1686
+ param: z.ZodString;
1687
+ title: z.ZodString;
1688
+ description: z.ZodString;
1689
+ max: z.ZodNumber;
1690
+ }, "strip", z.ZodTypeAny, {
1691
+ type: "multi-string";
1692
+ param: string;
1693
+ title: string;
1694
+ description: string;
1695
+ max: number;
1696
+ }, {
1697
+ type: "multi-string";
1698
+ param: string;
1699
+ title: string;
1700
+ description: string;
1701
+ max: number;
1702
+ }>, z.ZodObject<{
1703
+ type: z.ZodLiteral<"select-string">;
1704
+ param: z.ZodString;
1705
+ title: z.ZodString;
1706
+ description: z.ZodString;
1707
+ default: z.ZodString;
1708
+ choices: z.ZodArray<z.ZodString, "many">;
1709
+ }, "strip", z.ZodTypeAny, {
1710
+ type: "select-string";
1711
+ param: string;
1712
+ title: string;
1713
+ description: string;
1714
+ default: string;
1715
+ choices: string[];
1716
+ }, {
1717
+ type: "select-string";
1718
+ param: string;
1719
+ title: string;
1720
+ description: string;
1721
+ default: string;
1722
+ choices: string[];
1723
+ }>, z.ZodObject<{
1724
+ type: z.ZodLiteral<"object-schema">;
1725
+ param: z.ZodString;
1726
+ title: z.ZodString;
1727
+ description: z.ZodString;
1728
+ objectSchema: z.ZodAny;
1729
+ }, "strip", z.ZodTypeAny, {
1730
+ type: "object-schema";
1731
+ param: string;
1732
+ title: string;
1733
+ description: string;
1734
+ objectSchema?: any;
1735
+ }, {
1736
+ type: "object-schema";
1737
+ param: string;
1738
+ title: string;
1739
+ description: string;
1740
+ objectSchema?: any;
1741
+ }>]>>;
1742
+ schema: z.ZodType<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>, z.ZodTypeDef, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>>;
1743
+ }, "strip", z.ZodTypeAny, {
1744
+ def: Record<string, {
1745
+ type: "multi-string";
1746
+ param: string;
1747
+ title: string;
1748
+ description: string;
1749
+ max: number;
1750
+ } | {
1751
+ type: "range";
1752
+ param: string;
1753
+ title: string;
1754
+ description: string;
1755
+ max: number;
1756
+ min: number;
1757
+ step: number;
1758
+ default: number;
1759
+ } | {
1760
+ type: "select-string";
1761
+ param: string;
1762
+ title: string;
1763
+ description: string;
1764
+ default: string;
1765
+ choices: string[];
1766
+ } | {
1767
+ type: "object-schema";
1768
+ param: string;
1769
+ title: string;
1770
+ description: string;
1771
+ objectSchema?: any;
1772
+ }>;
1773
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1774
+ }, {
1775
+ def: Record<string, {
1776
+ type: "multi-string";
1777
+ param: string;
1778
+ title: string;
1779
+ description: string;
1780
+ max: number;
1781
+ } | {
1782
+ type: "range";
1783
+ param: string;
1784
+ title: string;
1785
+ description: string;
1786
+ max: number;
1787
+ min: number;
1788
+ step: number;
1789
+ default: number;
1790
+ } | {
1791
+ type: "select-string";
1792
+ param: string;
1793
+ title: string;
1794
+ description: string;
1795
+ default: string;
1796
+ choices: string[];
1797
+ } | {
1798
+ type: "object-schema";
1799
+ param: string;
1800
+ title: string;
1801
+ description: string;
1802
+ objectSchema?: any;
1803
+ }>;
1804
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1805
+ }>, {
1806
+ def: Record<string, {
1807
+ type: "multi-string";
1808
+ param: string;
1809
+ title: string;
1810
+ description: string;
1811
+ max: number;
1812
+ } | {
1813
+ type: "range";
1814
+ param: string;
1815
+ title: string;
1816
+ description: string;
1817
+ max: number;
1818
+ min: number;
1819
+ step: number;
1820
+ default: number;
1821
+ } | {
1822
+ type: "select-string";
1823
+ param: string;
1824
+ title: string;
1825
+ description: string;
1826
+ default: string;
1827
+ choices: string[];
1828
+ } | {
1829
+ type: "object-schema";
1830
+ param: string;
1831
+ title: string;
1832
+ description: string;
1833
+ objectSchema?: any;
1834
+ }>;
1835
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1836
+ }, {
1837
+ def: Record<string, {
1838
+ type: "multi-string";
1839
+ param: string;
1840
+ title: string;
1841
+ description: string;
1842
+ max: number;
1843
+ } | {
1844
+ type: "range";
1845
+ param: string;
1846
+ title: string;
1847
+ description: string;
1848
+ max: number;
1849
+ min: number;
1850
+ step: number;
1851
+ default: number;
1852
+ } | {
1853
+ type: "select-string";
1854
+ param: string;
1855
+ title: string;
1856
+ description: string;
1857
+ default: string;
1858
+ choices: string[];
1859
+ } | {
1860
+ type: "object-schema";
1861
+ param: string;
1862
+ title: string;
1863
+ description: string;
1864
+ objectSchema?: any;
1865
+ }>;
1866
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1867
+ }>;
1868
+ }, "strip", z.ZodTypeAny, {
1869
+ description: string;
1870
+ name: string;
1871
+ modalities: [M["_output"], ...M["_output"][]];
1872
+ maxInputTokens: number;
1873
+ maxOutputTokens: number;
1874
+ config: {
1875
+ def: Record<string, {
1876
+ type: "multi-string";
1877
+ param: string;
1878
+ title: string;
1879
+ description: string;
1880
+ max: number;
1881
+ } | {
1882
+ type: "range";
1883
+ param: string;
1884
+ title: string;
1885
+ description: string;
1886
+ max: number;
1887
+ min: number;
1888
+ step: number;
1889
+ default: number;
1890
+ } | {
1891
+ type: "select-string";
1892
+ param: string;
1893
+ title: string;
1894
+ description: string;
1895
+ default: string;
1896
+ choices: string[];
1897
+ } | {
1898
+ type: "object-schema";
1899
+ param: string;
1900
+ title: string;
1901
+ description: string;
1902
+ objectSchema?: any;
1903
+ }>;
1904
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1905
+ };
1906
+ }, {
1907
+ description: string;
1908
+ name: string;
1909
+ modalities: [M["_input"], ...M["_input"][]];
1910
+ maxInputTokens: number;
1911
+ maxOutputTokens: number;
1912
+ config: {
1913
+ def: Record<string, {
1914
+ type: "multi-string";
1915
+ param: string;
1916
+ title: string;
1917
+ description: string;
1918
+ max: number;
1919
+ } | {
1920
+ type: "range";
1921
+ param: string;
1922
+ title: string;
1923
+ description: string;
1924
+ max: number;
1925
+ min: number;
1926
+ step: number;
1927
+ default: number;
1928
+ } | {
1929
+ type: "select-string";
1930
+ param: string;
1931
+ title: string;
1932
+ description: string;
1933
+ default: string;
1934
+ choices: string[];
1935
+ } | {
1936
+ type: "object-schema";
1937
+ param: string;
1938
+ title: string;
1939
+ description: string;
1940
+ objectSchema?: any;
1941
+ }>;
1942
+ schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1943
+ };
1944
+ }>;
1945
+ type EmbeddingModelSchemaType<M extends z.ZodEnum<[string, ...string[]]> = typeof EmbeddingModalityEnum> = z.infer<ReturnType<typeof EmbeddingModelSchema<M>>>;
1946
+
1947
+ interface EmbeddingModelV1<MS extends EmbeddingModelSchemaType = EmbeddingModelSchemaType> {
1948
+ readonly version: "v1";
1949
+ readonly modelSchema: MS;
1950
+ getTokenCount: (requests: EmbeddingRequestsType) => number;
1951
+ getDefaultBaseUrl: () => UrlType;
1952
+ getDefaultHeaders: () => HeadersType;
1953
+ getDefaultParams: () => ParamsType;
1954
+ transformConfig: (config: ConfigType, requests?: EmbeddingRequestsType) => ParamsType;
1955
+ transformEmbeddingRequests: (requests: EmbeddingRequestsType) => ParamsType;
1956
+ getGetEmbeddingsUrl: (config: ConfigType, requests: EmbeddingRequestsType) => UrlType;
1957
+ getGetEmbeddingsHeaders: (config: ConfigType, requests: EmbeddingRequestsType) => HeadersType;
1958
+ getGetEmbeddingsData: (config: ConfigType, requests: EmbeddingRequestsType) => ParamsType;
1959
+ transformGetEmbeddingsResponse: (response: any) => EmbeddingsType;
1960
+ }
1961
+
1962
+ interface ProviderV1<O extends Record<string, any> = Record<string, any>> {
1963
+ readonly version: "v1";
1964
+ readonly name: string;
1965
+ chatModelLiterals(): string[];
1966
+ chatModel(name: string, options: O): ChatModelV1;
1967
+ chatModelSchema(name: string): ChatModelSchemaType;
1968
+ chatModelSchemas(): Record<string, ChatModelSchemaType>;
1969
+ embeddingModelLiterals(): string[];
1970
+ embeddingModel(name: string, options: O): EmbeddingModelV1;
1971
+ embeddingModelSchema(name: string): EmbeddingModelSchemaType;
1972
+ embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType>;
1973
+ }
1974
+
1975
+ declare const CONFIG: {
1976
+ TEMPERATURE: {
1977
+ readonly type: "range";
1978
+ readonly title: "Temperature";
1979
+ readonly description: "Adjusts the model's creativity level. With a setting of 0, the model strictly picks the most probable next word. For endeavors that benefit from a dash of inventiveness, consider dialing it up to 0.7 or higher, enabling the model to produce text that's unexpectedly fresh.";
1980
+ };
1981
+ MAX_TOKENS: {
1982
+ readonly type: "range";
1983
+ readonly title: "Max tokens";
1984
+ readonly description: "Specify the total tokens for generation, where one token approximates four English characters. Setting this to 0 defaults to the model's maximum capacity.";
1985
+ };
1986
+ STOP: (max: number) => {
1987
+ readonly type: "multi";
1988
+ readonly title: "Stop sequence";
1989
+ readonly description: `Enter up to ${number} sequences that will halt additional text output. The generated text will exclude these sequences.`;
1990
+ };
1991
+ TOP_P: {
1992
+ readonly type: "range";
1993
+ readonly title: "Top P";
1994
+ readonly description: "Selects a subset of likely tokens for generation, restricting choices to the top-P fraction of possibilities, such as the top 10% when P=0.1. This approach can limit the variety of the output. By default, it's set to 1, indicating no restriction. It's advised to adjust this parameter or temperature to modulate output diversity, but not to modify both simultaneously.";
1995
+ };
1996
+ TOP_K: {
1997
+ readonly type: "range";
1998
+ readonly title: "Top K";
1999
+ readonly description: "Select only from the highest K probabilities for each following word, effectively eliminating the less likely 'long tail' options.";
2000
+ };
2001
+ FREQUENCY_PENALTY: {
2002
+ readonly type: "range";
2003
+ readonly title: "Frequency penalty";
2004
+ readonly description: "Minimize redundancy. By assigning a penalty to frequently used tokens within the text, the likelihood of repeating identical phrases is reduced. The default setting for this penalty is zero.";
2005
+ };
2006
+ PRESENCE_PENALTY: {
2007
+ readonly type: "range";
2008
+ readonly title: "Presence penalty";
2009
+ readonly description: "Enhance the introduction of novel subjects by reducing the preference for tokens that have already appeared in the text, thus boosting the chances of exploring fresh topics. The standard setting for this is zero.";
2010
+ };
2011
+ };
2012
+
2013
+ declare const getErrorMessage: (error: unknown | undefined) => string;
2014
+
2015
+ declare const removeUndefinedEntries: <T = unknown>(record: Record<string, T | undefined>) => Record<string, T>;
2016
+
2017
+ declare const convertBase64ToUint8Array: (base64String: string) => Uint8Array;
2018
+ declare const convertUint8ArrayToBase64: (array: Uint8Array) => string;
2019
+
2020
+ declare const urlWithoutTrailingSlash: (url: string) => string;
2021
+
2022
+ export { ApiRequestError, ApiResponseError, CONFIG, ChatModelSchema, type ChatModelSchemaType, type ChatModelV1, ConfigItemDef, type ConfigItemDefType, ConfigItemEnum, type ConfigItemEnumType, ConfigItemLiterals, DownloadError, EmbeddingModelSchema, type EmbeddingModelSchemaType, type EmbeddingModelV1, Headers, type HeadersType, InvalidAuthError, InvalidConfigError, InvalidEmbeddingRequestsError, InvalidEndpointError, InvalidMessagesError, InvalidModalityError, InvalidModelError, InvalidPromptError, InvalidRoleError, InvalidToolsError, JsonParseError, MultiStringConfigItem, MultiStringConfigItemDef, MultiStringConfigItemSchema, type MultiStringConfigItemSchemaType, type MultiStringConfigItemType, MultiStringConfigItemTypeLiteral, ObjectSchemaConfigItem, ObjectSchemaConfigItemDef, ObjectSchemaConfigItemSchema, type ObjectSchemaConfigItemSchemaType, type ObjectSchemaConfigItemType, ObjectSchemaConfigItemTypeLiteral, Params, type ParamsType, type ProviderV1, RangeConfigItem, RangeConfigItemDef, type RangeConfigItemDefType, RangeConfigItemSchema, type RangeConfigItemSchemaType, RangeConfigItemTypeLiteral, SelectStringConfigItem, SelectStringConfigItemDef, type SelectStringConfigItemDefType, SelectStringConfigItemSchema, type SelectStringConfigItemSchemaType, SelectStringConfigItemTypeLiteral, Url, type UrlType, ValidationError, convertBase64ToUint8Array, convertUint8ArrayToBase64, getErrorMessage, removeUndefinedEntries, urlWithoutTrailingSlash };