@adaline/provider 0.9.0 → 0.11.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 +128 -64
- package/dist/index.d.ts +128 -64
- package/dist/index.js +40 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -147,21 +147,21 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
147
147
|
param: z.ZodString;
|
|
148
148
|
title: z.ZodString;
|
|
149
149
|
description: z.ZodString;
|
|
150
|
-
default: z.ZodString
|
|
150
|
+
default: z.ZodNullable<z.ZodString>;
|
|
151
151
|
choices: z.ZodArray<z.ZodString, "many">;
|
|
152
152
|
}, "strip", z.ZodTypeAny, {
|
|
153
153
|
type: "select-string";
|
|
154
154
|
param: string;
|
|
155
155
|
title: string;
|
|
156
156
|
description: string;
|
|
157
|
-
default: string;
|
|
157
|
+
default: string | null;
|
|
158
158
|
choices: string[];
|
|
159
159
|
}, {
|
|
160
160
|
type: "select-string";
|
|
161
161
|
param: string;
|
|
162
162
|
title: string;
|
|
163
163
|
description: string;
|
|
164
|
-
default: string;
|
|
164
|
+
default: string | null;
|
|
165
165
|
choices: string[];
|
|
166
166
|
}>, z.ZodObject<{
|
|
167
167
|
type: z.ZodLiteral<"select-boolean">;
|
|
@@ -222,7 +222,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
222
222
|
param: string;
|
|
223
223
|
title: string;
|
|
224
224
|
description: string;
|
|
225
|
-
default: string;
|
|
225
|
+
default: string | null;
|
|
226
226
|
choices: string[];
|
|
227
227
|
} | {
|
|
228
228
|
type: "object-schema";
|
|
@@ -259,7 +259,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
259
259
|
param: string;
|
|
260
260
|
title: string;
|
|
261
261
|
description: string;
|
|
262
|
-
default: string;
|
|
262
|
+
default: string | null;
|
|
263
263
|
choices: string[];
|
|
264
264
|
} | {
|
|
265
265
|
type: "object-schema";
|
|
@@ -296,7 +296,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
296
296
|
param: string;
|
|
297
297
|
title: string;
|
|
298
298
|
description: string;
|
|
299
|
-
default: string;
|
|
299
|
+
default: string | null;
|
|
300
300
|
choices: string[];
|
|
301
301
|
} | {
|
|
302
302
|
type: "object-schema";
|
|
@@ -333,7 +333,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
333
333
|
param: string;
|
|
334
334
|
title: string;
|
|
335
335
|
description: string;
|
|
336
|
-
default: string;
|
|
336
|
+
default: string | null;
|
|
337
337
|
choices: string[];
|
|
338
338
|
} | {
|
|
339
339
|
type: "object-schema";
|
|
@@ -408,21 +408,21 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
408
408
|
param: z.ZodString;
|
|
409
409
|
title: z.ZodString;
|
|
410
410
|
description: z.ZodString;
|
|
411
|
-
default: z.ZodString
|
|
411
|
+
default: z.ZodNullable<z.ZodString>;
|
|
412
412
|
choices: z.ZodArray<z.ZodString, "many">;
|
|
413
413
|
}, "strip", z.ZodTypeAny, {
|
|
414
414
|
type: "select-string";
|
|
415
415
|
param: string;
|
|
416
416
|
title: string;
|
|
417
417
|
description: string;
|
|
418
|
-
default: string;
|
|
418
|
+
default: string | null;
|
|
419
419
|
choices: string[];
|
|
420
420
|
}, {
|
|
421
421
|
type: "select-string";
|
|
422
422
|
param: string;
|
|
423
423
|
title: string;
|
|
424
424
|
description: string;
|
|
425
|
-
default: string;
|
|
425
|
+
default: string | null;
|
|
426
426
|
choices: string[];
|
|
427
427
|
}>, z.ZodObject<{
|
|
428
428
|
type: z.ZodLiteral<"select-boolean">;
|
|
@@ -483,7 +483,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
483
483
|
param: string;
|
|
484
484
|
title: string;
|
|
485
485
|
description: string;
|
|
486
|
-
default: string;
|
|
486
|
+
default: string | null;
|
|
487
487
|
choices: string[];
|
|
488
488
|
} | {
|
|
489
489
|
type: "object-schema";
|
|
@@ -520,7 +520,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
520
520
|
param: string;
|
|
521
521
|
title: string;
|
|
522
522
|
description: string;
|
|
523
|
-
default: string;
|
|
523
|
+
default: string | null;
|
|
524
524
|
choices: string[];
|
|
525
525
|
} | {
|
|
526
526
|
type: "object-schema";
|
|
@@ -557,7 +557,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
557
557
|
param: string;
|
|
558
558
|
title: string;
|
|
559
559
|
description: string;
|
|
560
|
-
default: string;
|
|
560
|
+
default: string | null;
|
|
561
561
|
choices: string[];
|
|
562
562
|
} | {
|
|
563
563
|
type: "object-schema";
|
|
@@ -594,7 +594,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
594
594
|
param: string;
|
|
595
595
|
title: string;
|
|
596
596
|
description: string;
|
|
597
|
-
default: string;
|
|
597
|
+
default: string | null;
|
|
598
598
|
choices: string[];
|
|
599
599
|
} | {
|
|
600
600
|
type: "object-schema";
|
|
@@ -669,21 +669,21 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
669
669
|
param: z.ZodString;
|
|
670
670
|
title: z.ZodString;
|
|
671
671
|
description: z.ZodString;
|
|
672
|
-
default: z.ZodString
|
|
672
|
+
default: z.ZodNullable<z.ZodString>;
|
|
673
673
|
choices: z.ZodArray<z.ZodString, "many">;
|
|
674
674
|
}, "strip", z.ZodTypeAny, {
|
|
675
675
|
type: "select-string";
|
|
676
676
|
param: string;
|
|
677
677
|
title: string;
|
|
678
678
|
description: string;
|
|
679
|
-
default: string;
|
|
679
|
+
default: string | null;
|
|
680
680
|
choices: string[];
|
|
681
681
|
}, {
|
|
682
682
|
type: "select-string";
|
|
683
683
|
param: string;
|
|
684
684
|
title: string;
|
|
685
685
|
description: string;
|
|
686
|
-
default: string;
|
|
686
|
+
default: string | null;
|
|
687
687
|
choices: string[];
|
|
688
688
|
}>, z.ZodObject<{
|
|
689
689
|
type: z.ZodLiteral<"select-boolean">;
|
|
@@ -744,7 +744,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
744
744
|
param: string;
|
|
745
745
|
title: string;
|
|
746
746
|
description: string;
|
|
747
|
-
default: string;
|
|
747
|
+
default: string | null;
|
|
748
748
|
choices: string[];
|
|
749
749
|
} | {
|
|
750
750
|
type: "object-schema";
|
|
@@ -781,7 +781,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
781
781
|
param: string;
|
|
782
782
|
title: string;
|
|
783
783
|
description: string;
|
|
784
|
-
default: string;
|
|
784
|
+
default: string | null;
|
|
785
785
|
choices: string[];
|
|
786
786
|
} | {
|
|
787
787
|
type: "object-schema";
|
|
@@ -818,7 +818,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
818
818
|
param: string;
|
|
819
819
|
title: string;
|
|
820
820
|
description: string;
|
|
821
|
-
default: string;
|
|
821
|
+
default: string | null;
|
|
822
822
|
choices: string[];
|
|
823
823
|
} | {
|
|
824
824
|
type: "object-schema";
|
|
@@ -855,7 +855,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
855
855
|
param: string;
|
|
856
856
|
title: string;
|
|
857
857
|
description: string;
|
|
858
|
-
default: string;
|
|
858
|
+
default: string | null;
|
|
859
859
|
choices: string[];
|
|
860
860
|
} | {
|
|
861
861
|
type: "object-schema";
|
|
@@ -930,21 +930,21 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
930
930
|
param: z.ZodString;
|
|
931
931
|
title: z.ZodString;
|
|
932
932
|
description: z.ZodString;
|
|
933
|
-
default: z.ZodString
|
|
933
|
+
default: z.ZodNullable<z.ZodString>;
|
|
934
934
|
choices: z.ZodArray<z.ZodString, "many">;
|
|
935
935
|
}, "strip", z.ZodTypeAny, {
|
|
936
936
|
type: "select-string";
|
|
937
937
|
param: string;
|
|
938
938
|
title: string;
|
|
939
939
|
description: string;
|
|
940
|
-
default: string;
|
|
940
|
+
default: string | null;
|
|
941
941
|
choices: string[];
|
|
942
942
|
}, {
|
|
943
943
|
type: "select-string";
|
|
944
944
|
param: string;
|
|
945
945
|
title: string;
|
|
946
946
|
description: string;
|
|
947
|
-
default: string;
|
|
947
|
+
default: string | null;
|
|
948
948
|
choices: string[];
|
|
949
949
|
}>, z.ZodObject<{
|
|
950
950
|
type: z.ZodLiteral<"select-boolean">;
|
|
@@ -1005,7 +1005,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1005
1005
|
param: string;
|
|
1006
1006
|
title: string;
|
|
1007
1007
|
description: string;
|
|
1008
|
-
default: string;
|
|
1008
|
+
default: string | null;
|
|
1009
1009
|
choices: string[];
|
|
1010
1010
|
} | {
|
|
1011
1011
|
type: "object-schema";
|
|
@@ -1042,7 +1042,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1042
1042
|
param: string;
|
|
1043
1043
|
title: string;
|
|
1044
1044
|
description: string;
|
|
1045
|
-
default: string;
|
|
1045
|
+
default: string | null;
|
|
1046
1046
|
choices: string[];
|
|
1047
1047
|
} | {
|
|
1048
1048
|
type: "object-schema";
|
|
@@ -1079,7 +1079,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1079
1079
|
param: string;
|
|
1080
1080
|
title: string;
|
|
1081
1081
|
description: string;
|
|
1082
|
-
default: string;
|
|
1082
|
+
default: string | null;
|
|
1083
1083
|
choices: string[];
|
|
1084
1084
|
} | {
|
|
1085
1085
|
type: "object-schema";
|
|
@@ -1116,7 +1116,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1116
1116
|
param: string;
|
|
1117
1117
|
title: string;
|
|
1118
1118
|
description: string;
|
|
1119
|
-
default: string;
|
|
1119
|
+
default: string | null;
|
|
1120
1120
|
choices: string[];
|
|
1121
1121
|
} | {
|
|
1122
1122
|
type: "object-schema";
|
|
@@ -1191,21 +1191,21 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1191
1191
|
param: z.ZodString;
|
|
1192
1192
|
title: z.ZodString;
|
|
1193
1193
|
description: z.ZodString;
|
|
1194
|
-
default: z.ZodString
|
|
1194
|
+
default: z.ZodNullable<z.ZodString>;
|
|
1195
1195
|
choices: z.ZodArray<z.ZodString, "many">;
|
|
1196
1196
|
}, "strip", z.ZodTypeAny, {
|
|
1197
1197
|
type: "select-string";
|
|
1198
1198
|
param: string;
|
|
1199
1199
|
title: string;
|
|
1200
1200
|
description: string;
|
|
1201
|
-
default: string;
|
|
1201
|
+
default: string | null;
|
|
1202
1202
|
choices: string[];
|
|
1203
1203
|
}, {
|
|
1204
1204
|
type: "select-string";
|
|
1205
1205
|
param: string;
|
|
1206
1206
|
title: string;
|
|
1207
1207
|
description: string;
|
|
1208
|
-
default: string;
|
|
1208
|
+
default: string | null;
|
|
1209
1209
|
choices: string[];
|
|
1210
1210
|
}>, z.ZodObject<{
|
|
1211
1211
|
type: z.ZodLiteral<"select-boolean">;
|
|
@@ -1266,7 +1266,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1266
1266
|
param: string;
|
|
1267
1267
|
title: string;
|
|
1268
1268
|
description: string;
|
|
1269
|
-
default: string;
|
|
1269
|
+
default: string | null;
|
|
1270
1270
|
choices: string[];
|
|
1271
1271
|
} | {
|
|
1272
1272
|
type: "object-schema";
|
|
@@ -1303,7 +1303,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1303
1303
|
param: string;
|
|
1304
1304
|
title: string;
|
|
1305
1305
|
description: string;
|
|
1306
|
-
default: string;
|
|
1306
|
+
default: string | null;
|
|
1307
1307
|
choices: string[];
|
|
1308
1308
|
} | {
|
|
1309
1309
|
type: "object-schema";
|
|
@@ -1340,7 +1340,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1340
1340
|
param: string;
|
|
1341
1341
|
title: string;
|
|
1342
1342
|
description: string;
|
|
1343
|
-
default: string;
|
|
1343
|
+
default: string | null;
|
|
1344
1344
|
choices: string[];
|
|
1345
1345
|
} | {
|
|
1346
1346
|
type: "object-schema";
|
|
@@ -1377,7 +1377,7 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
|
|
|
1377
1377
|
param: string;
|
|
1378
1378
|
title: string;
|
|
1379
1379
|
description: string;
|
|
1380
|
-
default: string;
|
|
1380
|
+
default: string | null;
|
|
1381
1381
|
choices: string[];
|
|
1382
1382
|
} | {
|
|
1383
1383
|
type: "object-schema";
|
|
@@ -1459,21 +1459,21 @@ declare const ConfigItemDef: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1459
1459
|
param: z.ZodString;
|
|
1460
1460
|
title: z.ZodString;
|
|
1461
1461
|
description: z.ZodString;
|
|
1462
|
-
default: z.ZodString
|
|
1462
|
+
default: z.ZodNullable<z.ZodString>;
|
|
1463
1463
|
choices: z.ZodArray<z.ZodString, "many">;
|
|
1464
1464
|
}, "strip", z.ZodTypeAny, {
|
|
1465
1465
|
type: "select-string";
|
|
1466
1466
|
param: string;
|
|
1467
1467
|
title: string;
|
|
1468
1468
|
description: string;
|
|
1469
|
-
default: string;
|
|
1469
|
+
default: string | null;
|
|
1470
1470
|
choices: string[];
|
|
1471
1471
|
}, {
|
|
1472
1472
|
type: "select-string";
|
|
1473
1473
|
param: string;
|
|
1474
1474
|
title: string;
|
|
1475
1475
|
description: string;
|
|
1476
|
-
default: string;
|
|
1476
|
+
default: string | null;
|
|
1477
1477
|
choices: string[];
|
|
1478
1478
|
}>, z.ZodObject<{
|
|
1479
1479
|
type: z.ZodLiteral<"select-boolean">;
|
|
@@ -1600,25 +1600,25 @@ declare const SelectStringConfigItemDef: z.ZodObject<{
|
|
|
1600
1600
|
param: z.ZodString;
|
|
1601
1601
|
title: z.ZodString;
|
|
1602
1602
|
description: z.ZodString;
|
|
1603
|
-
default: z.ZodString
|
|
1603
|
+
default: z.ZodNullable<z.ZodString>;
|
|
1604
1604
|
choices: z.ZodArray<z.ZodString, "many">;
|
|
1605
1605
|
}, "strip", z.ZodTypeAny, {
|
|
1606
1606
|
type: "select-string";
|
|
1607
1607
|
param: string;
|
|
1608
1608
|
title: string;
|
|
1609
1609
|
description: string;
|
|
1610
|
-
default: string;
|
|
1610
|
+
default: string | null;
|
|
1611
1611
|
choices: string[];
|
|
1612
1612
|
}, {
|
|
1613
1613
|
type: "select-string";
|
|
1614
1614
|
param: string;
|
|
1615
1615
|
title: string;
|
|
1616
1616
|
description: string;
|
|
1617
|
-
default: string;
|
|
1617
|
+
default: string | null;
|
|
1618
1618
|
choices: string[];
|
|
1619
1619
|
}>;
|
|
1620
1620
|
type SelectStringConfigItemDefType = z.infer<typeof SelectStringConfigItemDef>;
|
|
1621
|
-
declare const SelectStringConfigItemSchema: (defaultValue: string, choices: string[]) => z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]
|
|
1621
|
+
declare const SelectStringConfigItemSchema: (defaultValue: string | null, choices: string[]) => z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
|
|
1622
1622
|
type SelectStringConfigItemSchemaType = z.infer<ReturnType<typeof SelectStringConfigItemSchema>>;
|
|
1623
1623
|
declare const SelectStringConfigItem: (data: Omit<SelectStringConfigItemDefType, "type">) => {
|
|
1624
1624
|
def: {
|
|
@@ -1626,10 +1626,10 @@ declare const SelectStringConfigItem: (data: Omit<SelectStringConfigItemDefType,
|
|
|
1626
1626
|
param: string;
|
|
1627
1627
|
title: string;
|
|
1628
1628
|
description: string;
|
|
1629
|
-
default: string;
|
|
1629
|
+
default: string | null;
|
|
1630
1630
|
choices: string[];
|
|
1631
1631
|
};
|
|
1632
|
-
schema: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]
|
|
1632
|
+
schema: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
|
|
1633
1633
|
};
|
|
1634
1634
|
|
|
1635
1635
|
declare const SelectBooleanConfigItemTypeLiteral: "select-boolean";
|
|
@@ -1687,7 +1687,7 @@ declare const ObjectSchemaConfigItemDef: z.ZodObject<{
|
|
|
1687
1687
|
objectSchema?: any;
|
|
1688
1688
|
}>;
|
|
1689
1689
|
type ObjectSchemaConfigItemType = z.infer<typeof ObjectSchemaConfigItemDef>;
|
|
1690
|
-
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
|
|
1690
|
+
declare const ObjectSchemaConfigItemSchema: <S extends z.ZodRawShape>(schema: z.ZodObject<S>) => z.ZodOptional<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>>;
|
|
1691
1691
|
type ObjectSchemaConfigItemSchemaType<S extends z.ZodRawShape = z.ZodRawShape> = z.infer<ReturnType<typeof ObjectSchemaConfigItemSchema<S>>>;
|
|
1692
1692
|
declare const ObjectSchemaConfigItem: (data: Omit<ObjectSchemaConfigItemType, "type">) => {
|
|
1693
1693
|
def: {
|
|
@@ -1697,11 +1697,11 @@ declare const ObjectSchemaConfigItem: (data: Omit<ObjectSchemaConfigItemType, "t
|
|
|
1697
1697
|
description: string;
|
|
1698
1698
|
objectSchema?: any;
|
|
1699
1699
|
};
|
|
1700
|
-
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
1700
|
+
schema: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
1701
1701
|
[x: string]: any;
|
|
1702
1702
|
}, {
|
|
1703
1703
|
[x: string]: any;
|
|
1704
|
-
}
|
|
1704
|
+
}>>;
|
|
1705
1705
|
};
|
|
1706
1706
|
|
|
1707
1707
|
interface ChatModelV1<MS extends ChatModelSchemaType = ChatModelSchemaType> {
|
|
@@ -1794,21 +1794,21 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
|
|
|
1794
1794
|
param: z.ZodString;
|
|
1795
1795
|
title: z.ZodString;
|
|
1796
1796
|
description: z.ZodString;
|
|
1797
|
-
default: z.ZodString
|
|
1797
|
+
default: z.ZodNullable<z.ZodString>;
|
|
1798
1798
|
choices: z.ZodArray<z.ZodString, "many">;
|
|
1799
1799
|
}, "strip", z.ZodTypeAny, {
|
|
1800
1800
|
type: "select-string";
|
|
1801
1801
|
param: string;
|
|
1802
1802
|
title: string;
|
|
1803
1803
|
description: string;
|
|
1804
|
-
default: string;
|
|
1804
|
+
default: string | null;
|
|
1805
1805
|
choices: string[];
|
|
1806
1806
|
}, {
|
|
1807
1807
|
type: "select-string";
|
|
1808
1808
|
param: string;
|
|
1809
1809
|
title: string;
|
|
1810
1810
|
description: string;
|
|
1811
|
-
default: string;
|
|
1811
|
+
default: string | null;
|
|
1812
1812
|
choices: string[];
|
|
1813
1813
|
}>, z.ZodObject<{
|
|
1814
1814
|
type: z.ZodLiteral<"select-boolean">;
|
|
@@ -1869,7 +1869,7 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
|
|
|
1869
1869
|
param: string;
|
|
1870
1870
|
title: string;
|
|
1871
1871
|
description: string;
|
|
1872
|
-
default: string;
|
|
1872
|
+
default: string | null;
|
|
1873
1873
|
choices: string[];
|
|
1874
1874
|
} | {
|
|
1875
1875
|
type: "object-schema";
|
|
@@ -1906,7 +1906,7 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
|
|
|
1906
1906
|
param: string;
|
|
1907
1907
|
title: string;
|
|
1908
1908
|
description: string;
|
|
1909
|
-
default: string;
|
|
1909
|
+
default: string | null;
|
|
1910
1910
|
choices: string[];
|
|
1911
1911
|
} | {
|
|
1912
1912
|
type: "object-schema";
|
|
@@ -1943,7 +1943,7 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
|
|
|
1943
1943
|
param: string;
|
|
1944
1944
|
title: string;
|
|
1945
1945
|
description: string;
|
|
1946
|
-
default: string;
|
|
1946
|
+
default: string | null;
|
|
1947
1947
|
choices: string[];
|
|
1948
1948
|
} | {
|
|
1949
1949
|
type: "object-schema";
|
|
@@ -1980,7 +1980,7 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
|
|
|
1980
1980
|
param: string;
|
|
1981
1981
|
title: string;
|
|
1982
1982
|
description: string;
|
|
1983
|
-
default: string;
|
|
1983
|
+
default: string | null;
|
|
1984
1984
|
choices: string[];
|
|
1985
1985
|
} | {
|
|
1986
1986
|
type: "object-schema";
|
|
@@ -2024,7 +2024,7 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
|
|
|
2024
2024
|
param: string;
|
|
2025
2025
|
title: string;
|
|
2026
2026
|
description: string;
|
|
2027
|
-
default: string;
|
|
2027
|
+
default: string | null;
|
|
2028
2028
|
choices: string[];
|
|
2029
2029
|
} | {
|
|
2030
2030
|
type: "object-schema";
|
|
@@ -2068,7 +2068,7 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
|
|
|
2068
2068
|
param: string;
|
|
2069
2069
|
title: string;
|
|
2070
2070
|
description: string;
|
|
2071
|
-
default: string;
|
|
2071
|
+
default: string | null;
|
|
2072
2072
|
choices: string[];
|
|
2073
2073
|
} | {
|
|
2074
2074
|
type: "object-schema";
|
|
@@ -2125,41 +2125,104 @@ interface ProviderV1<O extends Record<string, any> = Record<string, any>> {
|
|
|
2125
2125
|
embeddingModelSchemas(): Record<string, EmbeddingModelSchemaType>;
|
|
2126
2126
|
}
|
|
2127
2127
|
|
|
2128
|
-
declare const
|
|
2128
|
+
declare const CHAT_CONFIG: {
|
|
2129
2129
|
TEMPERATURE: {
|
|
2130
2130
|
readonly type: "range";
|
|
2131
2131
|
readonly title: "Temperature";
|
|
2132
|
-
readonly description: "Adjusts the model's creativity level. With a setting of 0, the model strictly picks the most probable next word.
|
|
2132
|
+
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.";
|
|
2133
2133
|
};
|
|
2134
2134
|
MAX_TOKENS: {
|
|
2135
2135
|
readonly type: "range";
|
|
2136
2136
|
readonly title: "Max tokens";
|
|
2137
|
-
readonly description: "Specify the total tokens for generation, where one token approximates four English characters.
|
|
2137
|
+
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.";
|
|
2138
2138
|
};
|
|
2139
2139
|
STOP: (max: number) => {
|
|
2140
2140
|
readonly type: "multi";
|
|
2141
2141
|
readonly title: "Stop sequence";
|
|
2142
|
-
readonly description: `Enter up to ${number} sequences that will halt additional text output.
|
|
2142
|
+
readonly description: `Enter up to ${number} sequences that will halt additional text output. The generated text will exclude these sequences.`;
|
|
2143
|
+
};
|
|
2144
|
+
TOP_A: {
|
|
2145
|
+
readonly type: "range";
|
|
2146
|
+
readonly title: "Top A";
|
|
2147
|
+
readonly description: "Considers only the top tokens that have 'sufficiently high' probabilities relative to the most likely token, functioning like a dynamic Top-P. A lower Top-A value narrows down the token choices based on the highest probability token, while a higher Top-A value refines the filtering without necessarily impacting the creativity of the output.";
|
|
2143
2148
|
};
|
|
2144
2149
|
TOP_P: {
|
|
2145
2150
|
readonly type: "range";
|
|
2146
2151
|
readonly title: "Top P";
|
|
2147
|
-
readonly description: "Selects a subset of likely tokens for generation, restricting choices to the top-P fraction of possibilities,
|
|
2152
|
+
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.";
|
|
2148
2153
|
};
|
|
2149
2154
|
TOP_K: {
|
|
2150
2155
|
readonly type: "range";
|
|
2151
2156
|
readonly title: "Top K";
|
|
2152
2157
|
readonly description: "Select only from the highest K probabilities for each following word, effectively eliminating the less likely 'long tail' options.";
|
|
2153
2158
|
};
|
|
2159
|
+
MIN_P: {
|
|
2160
|
+
readonly type: "range";
|
|
2161
|
+
readonly title: "Min P";
|
|
2162
|
+
readonly description: "Specifies the minimum probability a token must have to be considered, in relation to the probability of the most likely token. (This value varies based on the confidence level of the top token.) For example, if Min-P is set to 0.1, only tokens with at least 1/10th the probability of the highest-ranked token will be considered.";
|
|
2163
|
+
};
|
|
2154
2164
|
FREQUENCY_PENALTY: {
|
|
2155
2165
|
readonly type: "range";
|
|
2156
2166
|
readonly title: "Frequency penalty";
|
|
2157
|
-
readonly description: "Minimize redundancy.
|
|
2167
|
+
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.";
|
|
2158
2168
|
};
|
|
2159
2169
|
PRESENCE_PENALTY: {
|
|
2160
2170
|
readonly type: "range";
|
|
2161
2171
|
readonly title: "Presence penalty";
|
|
2162
|
-
readonly description: "Enhance the introduction of novel subjects by reducing the preference for tokens that have already appeared in the text,
|
|
2172
|
+
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.";
|
|
2173
|
+
};
|
|
2174
|
+
REPETITION_PENALTY: {
|
|
2175
|
+
readonly type: "range";
|
|
2176
|
+
readonly title: "Repetition penalty";
|
|
2177
|
+
readonly description: "Reduces the likelihood of repeating tokens from the input. Increasing this value makes the model less prone to repetition, but setting it too high may lead to less coherent output, often resulting in run-on sentences missing smaller words. The token penalty is scaled according to the original token's probability.";
|
|
2178
|
+
};
|
|
2179
|
+
SEED: {
|
|
2180
|
+
readonly type: "range";
|
|
2181
|
+
readonly title: "Seed";
|
|
2182
|
+
readonly description: "When seed is fixed to a specific value, the model makes a best effort to provide the same response for repeated requests. Deterministic output isn't guaranteed. Also, changing the model or parameter settings, such as the temperature, can cause variations in the response even when you use the same seed value. By default, a random seed value is used.";
|
|
2183
|
+
};
|
|
2184
|
+
LOG_PROBS: {
|
|
2185
|
+
readonly type: "boolean";
|
|
2186
|
+
readonly title: "Log probs";
|
|
2187
|
+
readonly description: "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned.";
|
|
2188
|
+
};
|
|
2189
|
+
TOP_LOG_PROBS: {
|
|
2190
|
+
readonly type: "range";
|
|
2191
|
+
readonly title: "Top log probs";
|
|
2192
|
+
readonly description: "The number of most likely tokens to return at each token position, each with an associated log probability. 'logprobs' must be set to true if this parameter is used.";
|
|
2193
|
+
};
|
|
2194
|
+
ECHO: {
|
|
2195
|
+
readonly type: "boolean";
|
|
2196
|
+
readonly title: "Echo";
|
|
2197
|
+
readonly description: "If true, the response will contain the prompt.";
|
|
2198
|
+
};
|
|
2199
|
+
RESPONSE_FORMAT: {
|
|
2200
|
+
readonly type: "select";
|
|
2201
|
+
readonly title: "Response format";
|
|
2202
|
+
readonly description: "Choose the response format of your model. For JSON, you must include the string 'JSON' in some form within your system / user prompt.";
|
|
2203
|
+
};
|
|
2204
|
+
RESPONSE_FORMAT_WITH_SCHEMA: {
|
|
2205
|
+
readonly type: "select";
|
|
2206
|
+
readonly title: "Response format";
|
|
2207
|
+
readonly description: "Choose the response format of your model. 'json_object' colloquially known as JSON mode, instructs the model to respond with a valid JSON (must include the term 'json' in prompt). 'json_schema' colloquially known as structured outputs, allows you to specify a strict response schema that the model will adhere to.";
|
|
2208
|
+
};
|
|
2209
|
+
RESPONSE_SCHEMA: {
|
|
2210
|
+
readonly type: "object";
|
|
2211
|
+
readonly title: "Response schema";
|
|
2212
|
+
readonly description: "When response format is set to 'json_schema', the model will return a JSON object of the specified schema.";
|
|
2213
|
+
};
|
|
2214
|
+
};
|
|
2215
|
+
|
|
2216
|
+
declare const EMBEDDING_CONFIG: {
|
|
2217
|
+
DIMENSIONS: {
|
|
2218
|
+
readonly type: "range";
|
|
2219
|
+
readonly title: "Dimensions";
|
|
2220
|
+
readonly description: "Select the number of dimensions for the word embedding.";
|
|
2221
|
+
};
|
|
2222
|
+
ENCODING_FORMAT: {
|
|
2223
|
+
readonly type: "select";
|
|
2224
|
+
readonly title: "Encoding format";
|
|
2225
|
+
readonly description: "Select the encoding format for the word embedding.";
|
|
2163
2226
|
};
|
|
2164
2227
|
};
|
|
2165
2228
|
|
|
@@ -2170,9 +2233,10 @@ declare const removeUndefinedEntries: <T = unknown>(record: Record<string, T | u
|
|
|
2170
2233
|
declare const convertBase64ToUint8Array: (base64String: string) => Uint8Array;
|
|
2171
2234
|
declare const convertUint8ArrayToBase64: (array: Uint8Array) => string;
|
|
2172
2235
|
declare const encodedBase64ToString: (base64: string) => string;
|
|
2236
|
+
declare const getMimeTypeFromBase64: (base64: string) => string;
|
|
2173
2237
|
|
|
2174
2238
|
declare const urlWithoutTrailingSlash: (url: string) => string;
|
|
2175
2239
|
|
|
2176
2240
|
declare const isRunningInBrowser: () => boolean;
|
|
2177
2241
|
|
|
2178
|
-
export {
|
|
2242
|
+
export { CHAT_CONFIG, ChatModelSchema, type ChatModelSchemaType, type ChatModelV1, ConfigItemDef, type ConfigItemDefType, ConfigItemEnum, type ConfigItemEnumType, ConfigItemLiterals, EMBEDDING_CONFIG, EmbeddingModelSchema, type EmbeddingModelSchemaType, type EmbeddingModelV1, Headers, type HeadersType, InvalidConfigError, InvalidEmbeddingRequestsError, InvalidMessagesError, InvalidModelRequestError, InvalidToolsError, ModelError, ModelResponseError, MultiStringConfigItem, MultiStringConfigItemDef, MultiStringConfigItemSchema, type MultiStringConfigItemSchemaType, type MultiStringConfigItemType, MultiStringConfigItemTypeLiteral, ObjectSchemaConfigItem, ObjectSchemaConfigItemDef, ObjectSchemaConfigItemSchema, type ObjectSchemaConfigItemSchemaType, type ObjectSchemaConfigItemType, ObjectSchemaConfigItemTypeLiteral, Params, type ParamsType, ProviderError, type ProviderV1, RangeConfigItem, RangeConfigItemDef, type RangeConfigItemDefType, RangeConfigItemSchema, type RangeConfigItemSchemaType, RangeConfigItemTypeLiteral, SelectBooleanConfigItem, SelectBooleanConfigItemDef, type SelectBooleanConfigItemDefType, SelectBooleanConfigItemSchema, type SelectBooleanConfigItemSchemaType, SelectBooleanConfigItemTypeLiteral, SelectStringConfigItem, SelectStringConfigItemDef, type SelectStringConfigItemDefType, SelectStringConfigItemSchema, type SelectStringConfigItemSchemaType, SelectStringConfigItemTypeLiteral, Url, type UrlType, convertBase64ToUint8Array, convertUint8ArrayToBase64, encodedBase64ToString, getErrorMessage, getMimeTypeFromBase64, isRunningInBrowser, removeUndefinedEntries, urlWithoutTrailingSlash };
|