@adaline/provider 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { RoleEnum, ModalityEnum, MessageType, ConfigType, ToolType, PartialMessageType, EmbeddingModalityEnum, EmbeddingRequestsType, EmbeddingsType } from '@adaline/types';
2
+ import { RoleEnum, ModalityEnum, MessageType, ConfigType, ToolType, ChatResponseType, PartialChatResponseType, EmbeddingModalityEnum, EmbeddingRequestsType, EmbeddingResponseType } from '@adaline/types';
3
3
 
4
4
  declare class ApiRequestError extends Error {
5
5
  readonly name = "Gateway_ApiRequestError";
@@ -345,6 +345,24 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
345
345
  description: string;
346
346
  default: string;
347
347
  choices: string[];
348
+ }>, z.ZodObject<{
349
+ type: z.ZodLiteral<"select-boolean">;
350
+ param: z.ZodString;
351
+ title: z.ZodString;
352
+ description: z.ZodString;
353
+ default: z.ZodNullable<z.ZodBoolean>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ type: "select-boolean";
356
+ param: string;
357
+ title: string;
358
+ description: string;
359
+ default: boolean | null;
360
+ }, {
361
+ type: "select-boolean";
362
+ param: string;
363
+ title: string;
364
+ description: string;
365
+ default: boolean | null;
348
366
  }>, z.ZodObject<{
349
367
  type: z.ZodLiteral<"object-schema">;
350
368
  param: z.ZodString;
@@ -394,6 +412,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
394
412
  title: string;
395
413
  description: string;
396
414
  objectSchema?: any;
415
+ } | {
416
+ type: "select-boolean";
417
+ param: string;
418
+ title: string;
419
+ description: string;
420
+ default: boolean | null;
397
421
  }>;
398
422
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
399
423
  }, {
@@ -425,6 +449,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
425
449
  title: string;
426
450
  description: string;
427
451
  objectSchema?: any;
452
+ } | {
453
+ type: "select-boolean";
454
+ param: string;
455
+ title: string;
456
+ description: string;
457
+ default: boolean | null;
428
458
  }>;
429
459
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
430
460
  }>, {
@@ -456,6 +486,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
456
486
  title: string;
457
487
  description: string;
458
488
  objectSchema?: any;
489
+ } | {
490
+ type: "select-boolean";
491
+ param: string;
492
+ title: string;
493
+ description: string;
494
+ default: boolean | null;
459
495
  }>;
460
496
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
461
497
  }, {
@@ -487,6 +523,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
487
523
  title: string;
488
524
  description: string;
489
525
  objectSchema?: any;
526
+ } | {
527
+ type: "select-boolean";
528
+ param: string;
529
+ title: string;
530
+ description: string;
531
+ default: boolean | null;
490
532
  }>;
491
533
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
492
534
  }>;
@@ -564,6 +606,24 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
564
606
  description: string;
565
607
  default: string;
566
608
  choices: string[];
609
+ }>, z.ZodObject<{
610
+ type: z.ZodLiteral<"select-boolean">;
611
+ param: z.ZodString;
612
+ title: z.ZodString;
613
+ description: z.ZodString;
614
+ default: z.ZodNullable<z.ZodBoolean>;
615
+ }, "strip", z.ZodTypeAny, {
616
+ type: "select-boolean";
617
+ param: string;
618
+ title: string;
619
+ description: string;
620
+ default: boolean | null;
621
+ }, {
622
+ type: "select-boolean";
623
+ param: string;
624
+ title: string;
625
+ description: string;
626
+ default: boolean | null;
567
627
  }>, z.ZodObject<{
568
628
  type: z.ZodLiteral<"object-schema">;
569
629
  param: z.ZodString;
@@ -613,6 +673,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
613
673
  title: string;
614
674
  description: string;
615
675
  objectSchema?: any;
676
+ } | {
677
+ type: "select-boolean";
678
+ param: string;
679
+ title: string;
680
+ description: string;
681
+ default: boolean | null;
616
682
  }>;
617
683
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
618
684
  }, {
@@ -644,6 +710,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
644
710
  title: string;
645
711
  description: string;
646
712
  objectSchema?: any;
713
+ } | {
714
+ type: "select-boolean";
715
+ param: string;
716
+ title: string;
717
+ description: string;
718
+ default: boolean | null;
647
719
  }>;
648
720
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
649
721
  }>, {
@@ -675,6 +747,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
675
747
  title: string;
676
748
  description: string;
677
749
  objectSchema?: any;
750
+ } | {
751
+ type: "select-boolean";
752
+ param: string;
753
+ title: string;
754
+ description: string;
755
+ default: boolean | null;
678
756
  }>;
679
757
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
680
758
  }, {
@@ -706,6 +784,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
706
784
  title: string;
707
785
  description: string;
708
786
  objectSchema?: any;
787
+ } | {
788
+ type: "select-boolean";
789
+ param: string;
790
+ title: string;
791
+ description: string;
792
+ default: boolean | null;
709
793
  }>;
710
794
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
711
795
  }>;
@@ -783,6 +867,24 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
783
867
  description: string;
784
868
  default: string;
785
869
  choices: string[];
870
+ }>, z.ZodObject<{
871
+ type: z.ZodLiteral<"select-boolean">;
872
+ param: z.ZodString;
873
+ title: z.ZodString;
874
+ description: z.ZodString;
875
+ default: z.ZodNullable<z.ZodBoolean>;
876
+ }, "strip", z.ZodTypeAny, {
877
+ type: "select-boolean";
878
+ param: string;
879
+ title: string;
880
+ description: string;
881
+ default: boolean | null;
882
+ }, {
883
+ type: "select-boolean";
884
+ param: string;
885
+ title: string;
886
+ description: string;
887
+ default: boolean | null;
786
888
  }>, z.ZodObject<{
787
889
  type: z.ZodLiteral<"object-schema">;
788
890
  param: z.ZodString;
@@ -832,6 +934,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
832
934
  title: string;
833
935
  description: string;
834
936
  objectSchema?: any;
937
+ } | {
938
+ type: "select-boolean";
939
+ param: string;
940
+ title: string;
941
+ description: string;
942
+ default: boolean | null;
835
943
  }>;
836
944
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
837
945
  }, {
@@ -863,6 +971,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
863
971
  title: string;
864
972
  description: string;
865
973
  objectSchema?: any;
974
+ } | {
975
+ type: "select-boolean";
976
+ param: string;
977
+ title: string;
978
+ description: string;
979
+ default: boolean | null;
866
980
  }>;
867
981
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
868
982
  }>, {
@@ -894,6 +1008,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
894
1008
  title: string;
895
1009
  description: string;
896
1010
  objectSchema?: any;
1011
+ } | {
1012
+ type: "select-boolean";
1013
+ param: string;
1014
+ title: string;
1015
+ description: string;
1016
+ default: boolean | null;
897
1017
  }>;
898
1018
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
899
1019
  }, {
@@ -925,6 +1045,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
925
1045
  title: string;
926
1046
  description: string;
927
1047
  objectSchema?: any;
1048
+ } | {
1049
+ type: "select-boolean";
1050
+ param: string;
1051
+ title: string;
1052
+ description: string;
1053
+ default: boolean | null;
928
1054
  }>;
929
1055
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
930
1056
  }>;
@@ -1002,6 +1128,24 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1002
1128
  description: string;
1003
1129
  default: string;
1004
1130
  choices: string[];
1131
+ }>, z.ZodObject<{
1132
+ type: z.ZodLiteral<"select-boolean">;
1133
+ param: z.ZodString;
1134
+ title: z.ZodString;
1135
+ description: z.ZodString;
1136
+ default: z.ZodNullable<z.ZodBoolean>;
1137
+ }, "strip", z.ZodTypeAny, {
1138
+ type: "select-boolean";
1139
+ param: string;
1140
+ title: string;
1141
+ description: string;
1142
+ default: boolean | null;
1143
+ }, {
1144
+ type: "select-boolean";
1145
+ param: string;
1146
+ title: string;
1147
+ description: string;
1148
+ default: boolean | null;
1005
1149
  }>, z.ZodObject<{
1006
1150
  type: z.ZodLiteral<"object-schema">;
1007
1151
  param: z.ZodString;
@@ -1051,6 +1195,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1051
1195
  title: string;
1052
1196
  description: string;
1053
1197
  objectSchema?: any;
1198
+ } | {
1199
+ type: "select-boolean";
1200
+ param: string;
1201
+ title: string;
1202
+ description: string;
1203
+ default: boolean | null;
1054
1204
  }>;
1055
1205
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1056
1206
  }, {
@@ -1082,6 +1232,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1082
1232
  title: string;
1083
1233
  description: string;
1084
1234
  objectSchema?: any;
1235
+ } | {
1236
+ type: "select-boolean";
1237
+ param: string;
1238
+ title: string;
1239
+ description: string;
1240
+ default: boolean | null;
1085
1241
  }>;
1086
1242
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1087
1243
  }>, {
@@ -1113,6 +1269,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1113
1269
  title: string;
1114
1270
  description: string;
1115
1271
  objectSchema?: any;
1272
+ } | {
1273
+ type: "select-boolean";
1274
+ param: string;
1275
+ title: string;
1276
+ description: string;
1277
+ default: boolean | null;
1116
1278
  }>;
1117
1279
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1118
1280
  }, {
@@ -1144,6 +1306,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1144
1306
  title: string;
1145
1307
  description: string;
1146
1308
  objectSchema?: any;
1309
+ } | {
1310
+ type: "select-boolean";
1311
+ param: string;
1312
+ title: string;
1313
+ description: string;
1314
+ default: boolean | null;
1147
1315
  }>;
1148
1316
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1149
1317
  }>;
@@ -1221,6 +1389,24 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1221
1389
  description: string;
1222
1390
  default: string;
1223
1391
  choices: string[];
1392
+ }>, z.ZodObject<{
1393
+ type: z.ZodLiteral<"select-boolean">;
1394
+ param: z.ZodString;
1395
+ title: z.ZodString;
1396
+ description: z.ZodString;
1397
+ default: z.ZodNullable<z.ZodBoolean>;
1398
+ }, "strip", z.ZodTypeAny, {
1399
+ type: "select-boolean";
1400
+ param: string;
1401
+ title: string;
1402
+ description: string;
1403
+ default: boolean | null;
1404
+ }, {
1405
+ type: "select-boolean";
1406
+ param: string;
1407
+ title: string;
1408
+ description: string;
1409
+ default: boolean | null;
1224
1410
  }>, z.ZodObject<{
1225
1411
  type: z.ZodLiteral<"object-schema">;
1226
1412
  param: z.ZodString;
@@ -1270,6 +1456,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1270
1456
  title: string;
1271
1457
  description: string;
1272
1458
  objectSchema?: any;
1459
+ } | {
1460
+ type: "select-boolean";
1461
+ param: string;
1462
+ title: string;
1463
+ description: string;
1464
+ default: boolean | null;
1273
1465
  }>;
1274
1466
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1275
1467
  }, {
@@ -1301,6 +1493,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1301
1493
  title: string;
1302
1494
  description: string;
1303
1495
  objectSchema?: any;
1496
+ } | {
1497
+ type: "select-boolean";
1498
+ param: string;
1499
+ title: string;
1500
+ description: string;
1501
+ default: boolean | null;
1304
1502
  }>;
1305
1503
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1306
1504
  }>, {
@@ -1332,6 +1530,12 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1332
1530
  title: string;
1333
1531
  description: string;
1334
1532
  objectSchema?: any;
1533
+ } | {
1534
+ type: "select-boolean";
1535
+ param: string;
1536
+ title: string;
1537
+ description: string;
1538
+ default: boolean | null;
1335
1539
  }>;
1336
1540
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1337
1541
  }, {
@@ -1363,13 +1567,19 @@ declare const ChatModelSchema: <R extends z.ZodEnum<[string, ...string[]]> = z.Z
1363
1567
  title: string;
1364
1568
  description: string;
1365
1569
  objectSchema?: any;
1570
+ } | {
1571
+ type: "select-boolean";
1572
+ param: string;
1573
+ title: string;
1574
+ description: string;
1575
+ default: boolean | null;
1366
1576
  }>;
1367
1577
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1368
1578
  }>;
1369
1579
  }>[k_1]; }>;
1370
1580
  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
1581
 
1372
- declare const Headers: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>;
1582
+ declare const Headers: z.ZodRecord<z.ZodString, z.ZodString>;
1373
1583
  type HeadersType = z.infer<typeof Headers>;
1374
1584
 
1375
1585
  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]>>;
@@ -1378,8 +1588,8 @@ type ParamsType = z.infer<typeof Params>;
1378
1588
  declare const Url: z.ZodString;
1379
1589
  type UrlType = z.infer<typeof Url>;
1380
1590
 
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"]>;
1591
+ declare const ConfigItemLiterals: readonly ["range", "multi-string", "select-string", "object-schema", "select-boolean"];
1592
+ declare const ConfigItemEnum: z.ZodEnum<["range", "multi-string", "select-string", "object-schema", "select-boolean"]>;
1383
1593
  type ConfigItemEnumType = z.infer<typeof ConfigItemEnum>;
1384
1594
  declare const ConfigItemDef: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1385
1595
  type: z.ZodLiteral<"range">;
@@ -1447,6 +1657,24 @@ declare const ConfigItemDef: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1447
1657
  description: string;
1448
1658
  default: string;
1449
1659
  choices: string[];
1660
+ }>, z.ZodObject<{
1661
+ type: z.ZodLiteral<"select-boolean">;
1662
+ param: z.ZodString;
1663
+ title: z.ZodString;
1664
+ description: z.ZodString;
1665
+ default: z.ZodNullable<z.ZodBoolean>;
1666
+ }, "strip", z.ZodTypeAny, {
1667
+ type: "select-boolean";
1668
+ param: string;
1669
+ title: string;
1670
+ description: string;
1671
+ default: boolean | null;
1672
+ }, {
1673
+ type: "select-boolean";
1674
+ param: string;
1675
+ title: string;
1676
+ description: string;
1677
+ default: boolean | null;
1450
1678
  }>, z.ZodObject<{
1451
1679
  type: z.ZodLiteral<"object-schema">;
1452
1680
  param: z.ZodString;
@@ -1586,6 +1814,40 @@ declare const SelectStringConfigItem: (data: Omit<SelectStringConfigItemDefType,
1586
1814
  schema: z.ZodOptional<z.ZodDefault<z.ZodEnum<[string, ...string[]]>>>;
1587
1815
  };
1588
1816
 
1817
+ declare const SelectBooleanConfigItemTypeLiteral: "select-boolean";
1818
+ declare const SelectBooleanConfigItemDef: z.ZodObject<{
1819
+ type: z.ZodLiteral<"select-boolean">;
1820
+ param: z.ZodString;
1821
+ title: z.ZodString;
1822
+ description: z.ZodString;
1823
+ default: z.ZodNullable<z.ZodBoolean>;
1824
+ }, "strip", z.ZodTypeAny, {
1825
+ type: "select-boolean";
1826
+ param: string;
1827
+ title: string;
1828
+ description: string;
1829
+ default: boolean | null;
1830
+ }, {
1831
+ type: "select-boolean";
1832
+ param: string;
1833
+ title: string;
1834
+ description: string;
1835
+ default: boolean | null;
1836
+ }>;
1837
+ type SelectBooleanConfigItemDefType = z.infer<typeof SelectBooleanConfigItemDef>;
1838
+ declare const SelectBooleanConfigItemSchema: (defaultValue: boolean | null) => z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
1839
+ type SelectBooleanConfigItemSchemaType = z.infer<ReturnType<typeof SelectBooleanConfigItemSchema>>;
1840
+ declare const SelectBooleanConfigItem: (data: Omit<SelectBooleanConfigItemDefType, "type">) => {
1841
+ def: {
1842
+ type: "select-boolean";
1843
+ param: string;
1844
+ title: string;
1845
+ description: string;
1846
+ default: boolean | null;
1847
+ };
1848
+ schema: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
1849
+ };
1850
+
1589
1851
  declare const ObjectSchemaConfigItemTypeLiteral: "object-schema";
1590
1852
  declare const ObjectSchemaConfigItemDef: z.ZodObject<{
1591
1853
  type: z.ZodLiteral<"object-schema">;
@@ -1627,22 +1889,22 @@ declare const ObjectSchemaConfigItem: (data: Omit<ObjectSchemaConfigItemType, "t
1627
1889
  interface ChatModelV1<MS extends ChatModelSchemaType = ChatModelSchemaType> {
1628
1890
  readonly version: "v1";
1629
1891
  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[];
1892
+ getTokenCount(messages: MessageType[]): number;
1893
+ getDefaultBaseUrl(): UrlType;
1894
+ getDefaultHeaders(): HeadersType;
1895
+ getDefaultParams(): ParamsType;
1896
+ transformConfig(config: ConfigType, messages?: MessageType[], tools?: ToolType[]): ParamsType;
1897
+ transformMessages(messages: MessageType[]): ParamsType;
1898
+ transformTools(tools: ToolType[]): ParamsType;
1899
+ getCompleteChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): UrlType;
1900
+ getCompleteChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
1901
+ getCompleteChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): ParamsType;
1902
+ transformCompleteChatResponse(response: any): ChatResponseType;
1903
+ getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): UrlType;
1904
+ getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
1905
+ getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): ParamsType;
1906
+ transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
1907
+ partialResponse: PartialChatResponseType;
1646
1908
  buffer: string;
1647
1909
  }>;
1648
1910
  }
@@ -1720,6 +1982,24 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
1720
1982
  description: string;
1721
1983
  default: string;
1722
1984
  choices: string[];
1985
+ }>, z.ZodObject<{
1986
+ type: z.ZodLiteral<"select-boolean">;
1987
+ param: z.ZodString;
1988
+ title: z.ZodString;
1989
+ description: z.ZodString;
1990
+ default: z.ZodNullable<z.ZodBoolean>;
1991
+ }, "strip", z.ZodTypeAny, {
1992
+ type: "select-boolean";
1993
+ param: string;
1994
+ title: string;
1995
+ description: string;
1996
+ default: boolean | null;
1997
+ }, {
1998
+ type: "select-boolean";
1999
+ param: string;
2000
+ title: string;
2001
+ description: string;
2002
+ default: boolean | null;
1723
2003
  }>, z.ZodObject<{
1724
2004
  type: z.ZodLiteral<"object-schema">;
1725
2005
  param: z.ZodString;
@@ -1769,6 +2049,12 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
1769
2049
  title: string;
1770
2050
  description: string;
1771
2051
  objectSchema?: any;
2052
+ } | {
2053
+ type: "select-boolean";
2054
+ param: string;
2055
+ title: string;
2056
+ description: string;
2057
+ default: boolean | null;
1772
2058
  }>;
1773
2059
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1774
2060
  }, {
@@ -1800,6 +2086,12 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
1800
2086
  title: string;
1801
2087
  description: string;
1802
2088
  objectSchema?: any;
2089
+ } | {
2090
+ type: "select-boolean";
2091
+ param: string;
2092
+ title: string;
2093
+ description: string;
2094
+ default: boolean | null;
1803
2095
  }>;
1804
2096
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1805
2097
  }>, {
@@ -1831,6 +2123,12 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
1831
2123
  title: string;
1832
2124
  description: string;
1833
2125
  objectSchema?: any;
2126
+ } | {
2127
+ type: "select-boolean";
2128
+ param: string;
2129
+ title: string;
2130
+ description: string;
2131
+ default: boolean | null;
1834
2132
  }>;
1835
2133
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1836
2134
  }, {
@@ -1862,6 +2160,12 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
1862
2160
  title: string;
1863
2161
  description: string;
1864
2162
  objectSchema?: any;
2163
+ } | {
2164
+ type: "select-boolean";
2165
+ param: string;
2166
+ title: string;
2167
+ description: string;
2168
+ default: boolean | null;
1865
2169
  }>;
1866
2170
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1867
2171
  }>;
@@ -1900,6 +2204,12 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
1900
2204
  title: string;
1901
2205
  description: string;
1902
2206
  objectSchema?: any;
2207
+ } | {
2208
+ type: "select-boolean";
2209
+ param: string;
2210
+ title: string;
2211
+ description: string;
2212
+ default: boolean | null;
1903
2213
  }>;
1904
2214
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1905
2215
  };
@@ -1938,6 +2248,12 @@ declare const EmbeddingModelSchema: <M extends z.ZodEnum<[string, ...string[]]>
1938
2248
  title: string;
1939
2249
  description: string;
1940
2250
  objectSchema?: any;
2251
+ } | {
2252
+ type: "select-boolean";
2253
+ param: string;
2254
+ title: string;
2255
+ description: string;
2256
+ default: boolean | null;
1941
2257
  }>;
1942
2258
  schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
1943
2259
  };
@@ -1953,10 +2269,10 @@ interface EmbeddingModelV1<MS extends EmbeddingModelSchemaType = EmbeddingModelS
1953
2269
  getDefaultParams: () => ParamsType;
1954
2270
  transformConfig: (config: ConfigType, requests?: EmbeddingRequestsType) => ParamsType;
1955
2271
  transformEmbeddingRequests: (requests: EmbeddingRequestsType) => ParamsType;
1956
- getGetEmbeddingsUrl: (config: ConfigType, requests: EmbeddingRequestsType) => UrlType;
1957
- getGetEmbeddingsHeaders: (config: ConfigType, requests: EmbeddingRequestsType) => HeadersType;
2272
+ getGetEmbeddingsUrl: (config?: ConfigType, requests?: EmbeddingRequestsType) => UrlType;
2273
+ getGetEmbeddingsHeaders: (config?: ConfigType, requests?: EmbeddingRequestsType) => HeadersType;
1958
2274
  getGetEmbeddingsData: (config: ConfigType, requests: EmbeddingRequestsType) => ParamsType;
1959
- transformGetEmbeddingsResponse: (response: any) => EmbeddingsType;
2275
+ transformGetEmbeddingsResponse: (response: any) => EmbeddingResponseType;
1960
2276
  }
1961
2277
 
1962
2278
  interface ProviderV1<O extends Record<string, any> = Record<string, any>> {
@@ -2016,7 +2332,10 @@ declare const removeUndefinedEntries: <T = unknown>(record: Record<string, T | u
2016
2332
 
2017
2333
  declare const convertBase64ToUint8Array: (base64String: string) => Uint8Array;
2018
2334
  declare const convertUint8ArrayToBase64: (array: Uint8Array) => string;
2335
+ declare const encodedBase64ToString: (base64: string) => string;
2019
2336
 
2020
2337
  declare const urlWithoutTrailingSlash: (url: string) => string;
2021
2338
 
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 };
2339
+ declare const isRunningInBrowser: () => boolean;
2340
+
2341
+ 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, SelectBooleanConfigItem, SelectBooleanConfigItemDef, type SelectBooleanConfigItemDefType, SelectBooleanConfigItemSchema, type SelectBooleanConfigItemSchemaType, SelectBooleanConfigItemTypeLiteral, SelectStringConfigItem, SelectStringConfigItemDef, type SelectStringConfigItemDefType, SelectStringConfigItemSchema, type SelectStringConfigItemSchemaType, SelectStringConfigItemTypeLiteral, Url, type UrlType, ValidationError, convertBase64ToUint8Array, convertUint8ArrayToBase64, encodedBase64ToString, getErrorMessage, isRunningInBrowser, removeUndefinedEntries, urlWithoutTrailingSlash };