@adaline/openai 0.22.0 → 0.23.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
@@ -448,16 +448,6 @@ declare const OpenAIChatModelConfigs: {
448
448
  min: number;
449
449
  step: number;
450
450
  };
451
- maxTokens: {
452
- type: "range";
453
- param: string;
454
- title: string;
455
- description: string;
456
- max: number;
457
- default: number;
458
- min: number;
459
- step: number;
460
- };
461
451
  responseFormat: {
462
452
  type: "select-string";
463
453
  param: string;
@@ -473,6 +463,16 @@ declare const OpenAIChatModelConfigs: {
473
463
  description: string;
474
464
  objectSchema?: any;
475
465
  };
466
+ maxTokens: {
467
+ type: "range";
468
+ param: string;
469
+ title: string;
470
+ description: string;
471
+ max: number;
472
+ default: number;
473
+ min: number;
474
+ step: number;
475
+ };
476
476
  stop: {
477
477
  type: "multi-string";
478
478
  param: string;
@@ -566,7 +566,6 @@ declare const OpenAIChatModelConfigs: {
566
566
  }>>;
567
567
  }>, {
568
568
  temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
569
- maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
570
569
  }>, "strip", zod.ZodTypeAny, {
571
570
  temperature?: number | undefined;
572
571
  seed?: number | undefined;
@@ -918,16 +917,6 @@ declare const ChatModelOSeriesConfigDef: (maxOutputTokens: number, maxSequences:
918
917
  min: number;
919
918
  step: number;
920
919
  };
921
- maxTokens: {
922
- type: "range";
923
- param: string;
924
- title: string;
925
- description: string;
926
- max: number;
927
- default: number;
928
- min: number;
929
- step: number;
930
- };
931
920
  responseFormat: {
932
921
  type: "select-string";
933
922
  param: string;
@@ -943,6 +932,16 @@ declare const ChatModelOSeriesConfigDef: (maxOutputTokens: number, maxSequences:
943
932
  description: string;
944
933
  objectSchema?: any;
945
934
  };
935
+ maxTokens: {
936
+ type: "range";
937
+ param: string;
938
+ title: string;
939
+ description: string;
940
+ max: number;
941
+ default: number;
942
+ min: number;
943
+ step: number;
944
+ };
946
945
  stop: {
947
946
  type: "multi-string";
948
947
  param: string;
@@ -1036,7 +1035,6 @@ declare const ChatModelOSeriesConfigSchema: (maxOutputTokens: number, maxSequenc
1036
1035
  }>>;
1037
1036
  }>, {
1038
1037
  temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1039
- maxTokens: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
1040
1038
  }>, "strip", zod.ZodTypeAny, {
1041
1039
  temperature?: number | undefined;
1042
1040
  seed?: number | undefined;
@@ -1535,7 +1533,6 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1535
1533
  }, "strip", z.ZodTypeAny, {
1536
1534
  role: string;
1537
1535
  content?: string | null | undefined;
1538
- refusal?: string | null | undefined;
1539
1536
  tool_calls?: {
1540
1537
  function: {
1541
1538
  name: string;
@@ -1544,10 +1541,10 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1544
1541
  type: "function";
1545
1542
  id: string;
1546
1543
  }[] | undefined;
1544
+ refusal?: string | null | undefined;
1547
1545
  }, {
1548
1546
  role: string;
1549
1547
  content?: string | null | undefined;
1550
- refusal?: string | null | undefined;
1551
1548
  tool_calls?: {
1552
1549
  function: {
1553
1550
  name: string;
@@ -1556,6 +1553,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1556
1553
  type: "function";
1557
1554
  id: string;
1558
1555
  }[] | undefined;
1556
+ refusal?: string | null | undefined;
1559
1557
  }>;
1560
1558
  logprobs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1561
1559
  content: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
@@ -1680,7 +1678,6 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1680
1678
  message: {
1681
1679
  role: string;
1682
1680
  content?: string | null | undefined;
1683
- refusal?: string | null | undefined;
1684
1681
  tool_calls?: {
1685
1682
  function: {
1686
1683
  name: string;
@@ -1689,6 +1686,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1689
1686
  type: "function";
1690
1687
  id: string;
1691
1688
  }[] | undefined;
1689
+ refusal?: string | null | undefined;
1692
1690
  };
1693
1691
  index: number;
1694
1692
  finish_reason: string;
@@ -1718,7 +1716,6 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1718
1716
  message: {
1719
1717
  role: string;
1720
1718
  content?: string | null | undefined;
1721
- refusal?: string | null | undefined;
1722
1719
  tool_calls?: {
1723
1720
  function: {
1724
1721
  name: string;
@@ -1727,6 +1724,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1727
1724
  type: "function";
1728
1725
  id: string;
1729
1726
  }[] | undefined;
1727
+ refusal?: string | null | undefined;
1730
1728
  };
1731
1729
  index: number;
1732
1730
  finish_reason: string;
@@ -1772,7 +1770,6 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1772
1770
  message: {
1773
1771
  role: string;
1774
1772
  content?: string | null | undefined;
1775
- refusal?: string | null | undefined;
1776
1773
  tool_calls?: {
1777
1774
  function: {
1778
1775
  name: string;
@@ -1781,6 +1778,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1781
1778
  type: "function";
1782
1779
  id: string;
1783
1780
  }[] | undefined;
1781
+ refusal?: string | null | undefined;
1784
1782
  };
1785
1783
  index: number;
1786
1784
  finish_reason: string;
@@ -1808,8 +1806,8 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1808
1806
  } | null | undefined;
1809
1807
  }[];
1810
1808
  id: string;
1811
- created: number;
1812
1809
  model: string;
1810
+ created: number;
1813
1811
  system_fingerprint: string | null;
1814
1812
  usage: {
1815
1813
  prompt_tokens: number;
@@ -1822,7 +1820,6 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1822
1820
  message: {
1823
1821
  role: string;
1824
1822
  content?: string | null | undefined;
1825
- refusal?: string | null | undefined;
1826
1823
  tool_calls?: {
1827
1824
  function: {
1828
1825
  name: string;
@@ -1831,6 +1828,7 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1831
1828
  type: "function";
1832
1829
  id: string;
1833
1830
  }[] | undefined;
1831
+ refusal?: string | null | undefined;
1834
1832
  };
1835
1833
  index: number;
1836
1834
  finish_reason: string;
@@ -1858,8 +1856,8 @@ declare const OpenAICompleteChatResponse: z.ZodObject<{
1858
1856
  } | null | undefined;
1859
1857
  }[];
1860
1858
  id: string;
1861
- created: number;
1862
1859
  model: string;
1860
+ created: number;
1863
1861
  system_fingerprint: string | null;
1864
1862
  usage: {
1865
1863
  prompt_tokens: number;
@@ -1943,7 +1941,6 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
1943
1941
  refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1944
1942
  }, "strip", z.ZodTypeAny, {
1945
1943
  content?: string | null | undefined;
1946
- refusal?: string | null | undefined;
1947
1944
  tool_calls?: {
1948
1945
  index: number;
1949
1946
  function?: {
@@ -1953,9 +1950,9 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
1953
1950
  type?: "function" | undefined;
1954
1951
  id?: string | undefined;
1955
1952
  }[] | undefined;
1953
+ refusal?: string | null | undefined;
1956
1954
  }, {
1957
1955
  content?: string | null | undefined;
1958
- refusal?: string | null | undefined;
1959
1956
  tool_calls?: {
1960
1957
  index: number;
1961
1958
  function?: {
@@ -1965,6 +1962,7 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
1965
1962
  type?: "function" | undefined;
1966
1963
  id?: string | undefined;
1967
1964
  }[] | undefined;
1965
+ refusal?: string | null | undefined;
1968
1966
  }>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>;
1969
1967
  logprobs: z.ZodNullable<z.ZodObject<{
1970
1968
  content: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
@@ -2112,7 +2110,6 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
2112
2110
  finish_reason: string | null;
2113
2111
  delta: {
2114
2112
  content?: string | null | undefined;
2115
- refusal?: string | null | undefined;
2116
2113
  tool_calls?: {
2117
2114
  index: number;
2118
2115
  function?: {
@@ -2122,6 +2119,7 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
2122
2119
  type?: "function" | undefined;
2123
2120
  id?: string | undefined;
2124
2121
  }[] | undefined;
2122
+ refusal?: string | null | undefined;
2125
2123
  } | {};
2126
2124
  }, {
2127
2125
  logprobs: {
@@ -2150,7 +2148,6 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
2150
2148
  finish_reason: string | null;
2151
2149
  delta: {
2152
2150
  content?: string | null | undefined;
2153
- refusal?: string | null | undefined;
2154
2151
  tool_calls?: {
2155
2152
  index: number;
2156
2153
  function?: {
@@ -2160,6 +2157,7 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
2160
2157
  type?: "function" | undefined;
2161
2158
  id?: string | undefined;
2162
2159
  }[] | undefined;
2160
+ refusal?: string | null | undefined;
2163
2161
  } | {};
2164
2162
  }>, "many">;
2165
2163
  usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -2204,7 +2202,6 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
2204
2202
  finish_reason: string | null;
2205
2203
  delta: {
2206
2204
  content?: string | null | undefined;
2207
- refusal?: string | null | undefined;
2208
2205
  tool_calls?: {
2209
2206
  index: number;
2210
2207
  function?: {
@@ -2214,11 +2211,12 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
2214
2211
  type?: "function" | undefined;
2215
2212
  id?: string | undefined;
2216
2213
  }[] | undefined;
2214
+ refusal?: string | null | undefined;
2217
2215
  } | {};
2218
2216
  }[];
2219
2217
  id: string;
2220
- created: number;
2221
2218
  model: string;
2219
+ created: number;
2222
2220
  system_fingerprint: string | null;
2223
2221
  usage?: {
2224
2222
  prompt_tokens: number;
@@ -2254,7 +2252,6 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
2254
2252
  finish_reason: string | null;
2255
2253
  delta: {
2256
2254
  content?: string | null | undefined;
2257
- refusal?: string | null | undefined;
2258
2255
  tool_calls?: {
2259
2256
  index: number;
2260
2257
  function?: {
@@ -2264,11 +2261,12 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
2264
2261
  type?: "function" | undefined;
2265
2262
  id?: string | undefined;
2266
2263
  }[] | undefined;
2264
+ refusal?: string | null | undefined;
2267
2265
  } | {};
2268
2266
  }[];
2269
2267
  id: string;
2270
- created: number;
2271
2268
  model: string;
2269
+ created: number;
2272
2270
  system_fingerprint: string | null;
2273
2271
  usage?: {
2274
2272
  prompt_tokens: number;
@@ -2458,17 +2456,17 @@ declare const OpenAIChatRequestSystemMessage: z.ZodObject<{
2458
2456
  text: string;
2459
2457
  }>, "many">]>;
2460
2458
  }, "strip", z.ZodTypeAny, {
2459
+ role: "system";
2461
2460
  content: string | {
2462
2461
  type: "text";
2463
2462
  text: string;
2464
2463
  }[];
2465
- role: "system";
2466
2464
  }, {
2465
+ role: "system";
2467
2466
  content: string | {
2468
2467
  type: "text";
2469
2468
  text: string;
2470
2469
  }[];
2471
- role: "system";
2472
2470
  }>;
2473
2471
  type OpenAIChatRequestSystemMessageType = z.infer<typeof OpenAIChatRequestSystemMessage>;
2474
2472
  declare const OpenAIChatRequestUserMessage: z.ZodObject<{
@@ -2508,6 +2506,7 @@ declare const OpenAIChatRequestUserMessage: z.ZodObject<{
2508
2506
  };
2509
2507
  }>]>, "many">]>;
2510
2508
  }, "strip", z.ZodTypeAny, {
2509
+ role: "user";
2511
2510
  content: string | ({
2512
2511
  type: "text";
2513
2512
  text: string;
@@ -2518,8 +2517,8 @@ declare const OpenAIChatRequestUserMessage: z.ZodObject<{
2518
2517
  detail?: "auto" | "low" | "high" | undefined;
2519
2518
  };
2520
2519
  })[];
2521
- role: "user";
2522
2520
  }, {
2521
+ role: "user";
2523
2522
  content: string | ({
2524
2523
  type: "text";
2525
2524
  text: string;
@@ -2530,7 +2529,6 @@ declare const OpenAIChatRequestUserMessage: z.ZodObject<{
2530
2529
  detail?: "auto" | "low" | "high" | undefined;
2531
2530
  };
2532
2531
  })[];
2533
- role: "user";
2534
2532
  }>;
2535
2533
  type OpenAIChatRequestUserMessageType = z.infer<typeof OpenAIChatRequestUserMessage>;
2536
2534
  declare const OpenAIChatRequestAssistantMessage: z.ZodObject<{
@@ -2608,12 +2606,12 @@ declare const OpenAIChatRequestToolMessage: z.ZodObject<{
2608
2606
  tool_call_id: z.ZodString;
2609
2607
  content: z.ZodString;
2610
2608
  }, "strip", z.ZodTypeAny, {
2611
- content: string;
2612
2609
  role: "tool";
2610
+ content: string;
2613
2611
  tool_call_id: string;
2614
2612
  }, {
2615
- content: string;
2616
2613
  role: "tool";
2614
+ content: string;
2617
2615
  tool_call_id: string;
2618
2616
  }>;
2619
2617
  type OpenAIChatRequestToolMessageType = z.infer<typeof OpenAIChatRequestToolMessage>;
@@ -2630,17 +2628,17 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
2630
2628
  text: string;
2631
2629
  }>, "many">]>;
2632
2630
  }, "strip", z.ZodTypeAny, {
2631
+ role: "system";
2633
2632
  content: string | {
2634
2633
  type: "text";
2635
2634
  text: string;
2636
2635
  }[];
2637
- role: "system";
2638
2636
  }, {
2637
+ role: "system";
2639
2638
  content: string | {
2640
2639
  type: "text";
2641
2640
  text: string;
2642
2641
  }[];
2643
- role: "system";
2644
2642
  }>, z.ZodObject<{
2645
2643
  role: z.ZodLiteral<"user">;
2646
2644
  content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
@@ -2678,6 +2676,7 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
2678
2676
  };
2679
2677
  }>]>, "many">]>;
2680
2678
  }, "strip", z.ZodTypeAny, {
2679
+ role: "user";
2681
2680
  content: string | ({
2682
2681
  type: "text";
2683
2682
  text: string;
@@ -2688,8 +2687,8 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
2688
2687
  detail?: "auto" | "low" | "high" | undefined;
2689
2688
  };
2690
2689
  })[];
2691
- role: "user";
2692
2690
  }, {
2691
+ role: "user";
2693
2692
  content: string | ({
2694
2693
  type: "text";
2695
2694
  text: string;
@@ -2700,7 +2699,6 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
2700
2699
  detail?: "auto" | "low" | "high" | undefined;
2701
2700
  };
2702
2701
  })[];
2703
- role: "user";
2704
2702
  }>, z.ZodObject<{
2705
2703
  role: z.ZodLiteral<"assistant">;
2706
2704
  content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
@@ -2774,12 +2772,12 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
2774
2772
  tool_call_id: z.ZodString;
2775
2773
  content: z.ZodString;
2776
2774
  }, "strip", z.ZodTypeAny, {
2777
- content: string;
2778
2775
  role: "tool";
2776
+ content: string;
2779
2777
  tool_call_id: string;
2780
2778
  }, {
2781
- content: string;
2782
2779
  role: "tool";
2780
+ content: string;
2783
2781
  tool_call_id: string;
2784
2782
  }>]>;
2785
2783
  type OpenAIChatRequestMessageType = z.infer<typeof OpenAIChatRequestMessage>;
@@ -2798,17 +2796,17 @@ declare const OpenAIChatRequest: z.ZodObject<{
2798
2796
  text: string;
2799
2797
  }>, "many">]>;
2800
2798
  }, "strip", z.ZodTypeAny, {
2799
+ role: "system";
2801
2800
  content: string | {
2802
2801
  type: "text";
2803
2802
  text: string;
2804
2803
  }[];
2805
- role: "system";
2806
2804
  }, {
2805
+ role: "system";
2807
2806
  content: string | {
2808
2807
  type: "text";
2809
2808
  text: string;
2810
2809
  }[];
2811
- role: "system";
2812
2810
  }>, z.ZodObject<{
2813
2811
  role: z.ZodLiteral<"user">;
2814
2812
  content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
@@ -2846,6 +2844,7 @@ declare const OpenAIChatRequest: z.ZodObject<{
2846
2844
  };
2847
2845
  }>]>, "many">]>;
2848
2846
  }, "strip", z.ZodTypeAny, {
2847
+ role: "user";
2849
2848
  content: string | ({
2850
2849
  type: "text";
2851
2850
  text: string;
@@ -2856,8 +2855,8 @@ declare const OpenAIChatRequest: z.ZodObject<{
2856
2855
  detail?: "auto" | "low" | "high" | undefined;
2857
2856
  };
2858
2857
  })[];
2859
- role: "user";
2860
2858
  }, {
2859
+ role: "user";
2861
2860
  content: string | ({
2862
2861
  type: "text";
2863
2862
  text: string;
@@ -2868,7 +2867,6 @@ declare const OpenAIChatRequest: z.ZodObject<{
2868
2867
  detail?: "auto" | "low" | "high" | undefined;
2869
2868
  };
2870
2869
  })[];
2871
- role: "user";
2872
2870
  }>, z.ZodObject<{
2873
2871
  role: z.ZodLiteral<"assistant">;
2874
2872
  content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
@@ -2942,18 +2940,18 @@ declare const OpenAIChatRequest: z.ZodObject<{
2942
2940
  tool_call_id: z.ZodString;
2943
2941
  content: z.ZodString;
2944
2942
  }, "strip", z.ZodTypeAny, {
2945
- content: string;
2946
2943
  role: "tool";
2944
+ content: string;
2947
2945
  tool_call_id: string;
2948
2946
  }, {
2949
- content: string;
2950
2947
  role: "tool";
2948
+ content: string;
2951
2949
  tool_call_id: string;
2952
2950
  }>]>, "many">;
2953
2951
  frequency_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2954
2952
  logprobs: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
2955
2953
  top_logprobs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2956
- max_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2954
+ max_completion_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2957
2955
  presence_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2958
2956
  response_format: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
2959
2957
  type: z.ZodEnum<["text", "json_object"]>;
@@ -3057,12 +3055,13 @@ declare const OpenAIChatRequest: z.ZodObject<{
3057
3055
  }>]>>;
3058
3056
  }, "strip", z.ZodTypeAny, {
3059
3057
  messages: ({
3058
+ role: "system";
3060
3059
  content: string | {
3061
3060
  type: "text";
3062
3061
  text: string;
3063
3062
  }[];
3064
- role: "system";
3065
3063
  } | {
3064
+ role: "user";
3066
3065
  content: string | ({
3067
3066
  type: "text";
3068
3067
  text: string;
@@ -3073,7 +3072,6 @@ declare const OpenAIChatRequest: z.ZodObject<{
3073
3072
  detail?: "auto" | "low" | "high" | undefined;
3074
3073
  };
3075
3074
  })[];
3076
- role: "user";
3077
3075
  } | {
3078
3076
  role: "assistant";
3079
3077
  content?: string | {
@@ -3089,8 +3087,8 @@ declare const OpenAIChatRequest: z.ZodObject<{
3089
3087
  id: string;
3090
3088
  }[] | undefined;
3091
3089
  } | {
3092
- content: string;
3093
3090
  role: "tool";
3091
+ content: string;
3094
3092
  tool_call_id: string;
3095
3093
  })[];
3096
3094
  temperature?: number | null | undefined;
@@ -3106,7 +3104,7 @@ declare const OpenAIChatRequest: z.ZodObject<{
3106
3104
  };
3107
3105
  type: "function";
3108
3106
  } | undefined;
3109
- max_tokens?: number | null | undefined;
3107
+ max_completion_tokens?: number | null | undefined;
3110
3108
  stop?: string | string[] | null | undefined;
3111
3109
  response_format?: {
3112
3110
  type: "text" | "json_object";
@@ -3131,12 +3129,13 @@ declare const OpenAIChatRequest: z.ZodObject<{
3131
3129
  }[] | undefined;
3132
3130
  }, {
3133
3131
  messages: ({
3132
+ role: "system";
3134
3133
  content: string | {
3135
3134
  type: "text";
3136
3135
  text: string;
3137
3136
  }[];
3138
- role: "system";
3139
3137
  } | {
3138
+ role: "user";
3140
3139
  content: string | ({
3141
3140
  type: "text";
3142
3141
  text: string;
@@ -3147,7 +3146,6 @@ declare const OpenAIChatRequest: z.ZodObject<{
3147
3146
  detail?: "auto" | "low" | "high" | undefined;
3148
3147
  };
3149
3148
  })[];
3150
- role: "user";
3151
3149
  } | {
3152
3150
  role: "assistant";
3153
3151
  content?: string | {
@@ -3163,8 +3161,8 @@ declare const OpenAIChatRequest: z.ZodObject<{
3163
3161
  id: string;
3164
3162
  }[] | undefined;
3165
3163
  } | {
3166
- content: string;
3167
3164
  role: "tool";
3165
+ content: string;
3168
3166
  tool_call_id: string;
3169
3167
  })[];
3170
3168
  temperature?: number | null | undefined;
@@ -3180,7 +3178,7 @@ declare const OpenAIChatRequest: z.ZodObject<{
3180
3178
  };
3181
3179
  type: "function";
3182
3180
  } | undefined;
3183
- max_tokens?: number | null | undefined;
3181
+ max_completion_tokens?: number | null | undefined;
3184
3182
  stop?: string | string[] | null | undefined;
3185
3183
  response_format?: {
3186
3184
  type: "text" | "json_object";
@@ -3206,7 +3204,7 @@ declare const OpenAIChatRequest: z.ZodObject<{
3206
3204
  }>;
3207
3205
  type OpenAIChatRequestType = z.infer<typeof OpenAIChatRequest>;
3208
3206
 
3209
- declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omit<{
3207
+ declare const OpenAIChatOSeriesRequest: z.ZodObject<{
3210
3208
  model: z.ZodOptional<z.ZodString>;
3211
3209
  messages: z.ZodArray<z.ZodUnion<[z.ZodObject<{
3212
3210
  role: z.ZodLiteral<"system">;
@@ -3221,17 +3219,17 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3221
3219
  text: string;
3222
3220
  }>, "many">]>;
3223
3221
  }, "strip", z.ZodTypeAny, {
3222
+ role: "system";
3224
3223
  content: string | {
3225
3224
  type: "text";
3226
3225
  text: string;
3227
3226
  }[];
3228
- role: "system";
3229
3227
  }, {
3228
+ role: "system";
3230
3229
  content: string | {
3231
3230
  type: "text";
3232
3231
  text: string;
3233
3232
  }[];
3234
- role: "system";
3235
3233
  }>, z.ZodObject<{
3236
3234
  role: z.ZodLiteral<"user">;
3237
3235
  content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
@@ -3269,6 +3267,7 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3269
3267
  };
3270
3268
  }>]>, "many">]>;
3271
3269
  }, "strip", z.ZodTypeAny, {
3270
+ role: "user";
3272
3271
  content: string | ({
3273
3272
  type: "text";
3274
3273
  text: string;
@@ -3279,8 +3278,8 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3279
3278
  detail?: "auto" | "low" | "high" | undefined;
3280
3279
  };
3281
3280
  })[];
3282
- role: "user";
3283
3281
  }, {
3282
+ role: "user";
3284
3283
  content: string | ({
3285
3284
  type: "text";
3286
3285
  text: string;
@@ -3291,7 +3290,6 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3291
3290
  detail?: "auto" | "low" | "high" | undefined;
3292
3291
  };
3293
3292
  })[];
3294
- role: "user";
3295
3293
  }>, z.ZodObject<{
3296
3294
  role: z.ZodLiteral<"assistant">;
3297
3295
  content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
@@ -3365,18 +3363,18 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3365
3363
  tool_call_id: z.ZodString;
3366
3364
  content: z.ZodString;
3367
3365
  }, "strip", z.ZodTypeAny, {
3368
- content: string;
3369
3366
  role: "tool";
3367
+ content: string;
3370
3368
  tool_call_id: string;
3371
3369
  }, {
3372
- content: string;
3373
3370
  role: "tool";
3371
+ content: string;
3374
3372
  tool_call_id: string;
3375
3373
  }>]>, "many">;
3376
3374
  frequency_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3377
3375
  logprobs: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
3378
3376
  top_logprobs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3379
- max_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3377
+ max_completion_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3380
3378
  presence_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3381
3379
  response_format: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
3382
3380
  type: z.ZodEnum<["text", "json_object"]>;
@@ -3478,16 +3476,15 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3478
3476
  };
3479
3477
  type: "function";
3480
3478
  }>]>>;
3481
- }, "max_tokens">, {
3482
- max_completion_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
3483
- }>, "strip", z.ZodTypeAny, {
3479
+ }, "strip", z.ZodTypeAny, {
3484
3480
  messages: ({
3481
+ role: "system";
3485
3482
  content: string | {
3486
3483
  type: "text";
3487
3484
  text: string;
3488
3485
  }[];
3489
- role: "system";
3490
3486
  } | {
3487
+ role: "user";
3491
3488
  content: string | ({
3492
3489
  type: "text";
3493
3490
  text: string;
@@ -3498,7 +3495,6 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3498
3495
  detail?: "auto" | "low" | "high" | undefined;
3499
3496
  };
3500
3497
  })[];
3501
- role: "user";
3502
3498
  } | {
3503
3499
  role: "assistant";
3504
3500
  content?: string | {
@@ -3514,8 +3510,8 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3514
3510
  id: string;
3515
3511
  }[] | undefined;
3516
3512
  } | {
3517
- content: string;
3518
3513
  role: "tool";
3514
+ content: string;
3519
3515
  tool_call_id: string;
3520
3516
  })[];
3521
3517
  temperature?: number | null | undefined;
@@ -3531,6 +3527,7 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3531
3527
  };
3532
3528
  type: "function";
3533
3529
  } | undefined;
3530
+ max_completion_tokens?: number | null | undefined;
3534
3531
  stop?: string | string[] | null | undefined;
3535
3532
  response_format?: {
3536
3533
  type: "text" | "json_object";
@@ -3543,7 +3540,6 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3543
3540
  schema?: any;
3544
3541
  };
3545
3542
  } | undefined;
3546
- max_completion_tokens?: number | null | undefined;
3547
3543
  model?: string | undefined;
3548
3544
  tools?: {
3549
3545
  function: {
@@ -3556,12 +3552,13 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3556
3552
  }[] | undefined;
3557
3553
  }, {
3558
3554
  messages: ({
3555
+ role: "system";
3559
3556
  content: string | {
3560
3557
  type: "text";
3561
3558
  text: string;
3562
3559
  }[];
3563
- role: "system";
3564
3560
  } | {
3561
+ role: "user";
3565
3562
  content: string | ({
3566
3563
  type: "text";
3567
3564
  text: string;
@@ -3572,7 +3569,6 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3572
3569
  detail?: "auto" | "low" | "high" | undefined;
3573
3570
  };
3574
3571
  })[];
3575
- role: "user";
3576
3572
  } | {
3577
3573
  role: "assistant";
3578
3574
  content?: string | {
@@ -3588,8 +3584,8 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3588
3584
  id: string;
3589
3585
  }[] | undefined;
3590
3586
  } | {
3591
- content: string;
3592
3587
  role: "tool";
3588
+ content: string;
3593
3589
  tool_call_id: string;
3594
3590
  })[];
3595
3591
  temperature?: number | null | undefined;
@@ -3605,6 +3601,7 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3605
3601
  };
3606
3602
  type: "function";
3607
3603
  } | undefined;
3604
+ max_completion_tokens?: number | null | undefined;
3608
3605
  stop?: string | string[] | null | undefined;
3609
3606
  response_format?: {
3610
3607
  type: "text" | "json_object";
@@ -3617,7 +3614,6 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<z.objectUtil.extendShape<Omi
3617
3614
  schema?: any;
3618
3615
  };
3619
3616
  } | undefined;
3620
- max_completion_tokens?: number | null | undefined;
3621
3617
  model?: string | undefined;
3622
3618
  tools?: {
3623
3619
  function: {
@@ -5223,28 +5219,28 @@ declare const OpenAIGetEmbeddingsResponse: z.ZodObject<{
5223
5219
  }>;
5224
5220
  }, "strip", z.ZodTypeAny, {
5225
5221
  object: "list";
5226
- model: string;
5227
- usage: {
5228
- prompt_tokens: number;
5229
- total_tokens: number;
5230
- };
5231
5222
  data: {
5232
5223
  object: "embedding";
5233
5224
  index: number;
5234
5225
  embedding: string | number[];
5235
5226
  }[];
5236
- }, {
5237
- object: "list";
5238
5227
  model: string;
5239
5228
  usage: {
5240
5229
  prompt_tokens: number;
5241
5230
  total_tokens: number;
5242
5231
  };
5232
+ }, {
5233
+ object: "list";
5243
5234
  data: {
5244
5235
  object: "embedding";
5245
5236
  index: number;
5246
5237
  embedding: string | number[];
5247
5238
  }[];
5239
+ model: string;
5240
+ usage: {
5241
+ prompt_tokens: number;
5242
+ total_tokens: number;
5243
+ };
5248
5244
  }>;
5249
5245
 
5250
5246
  declare const OpenAIEmbeddingRequestInput: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodArray<z.ZodNumber, "many">]>, z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">]>;