@adaline/openai 1.1.0 → 1.3.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 +138 -678
- package/dist/index.d.ts +138 -678
- package/dist/index.js +171 -179
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1471,11 +1471,6 @@ declare const OpenAIChatModelRolesMap: {
|
|
|
1471
1471
|
readonly assistant: "assistant";
|
|
1472
1472
|
readonly tool: "tool";
|
|
1473
1473
|
};
|
|
1474
|
-
declare const OpenAIChatModelOSSeriesRoles: z.ZodEnum<["user", "assistant"]>;
|
|
1475
|
-
declare const OpenAIChatModelOSSeriesRolesMap: {
|
|
1476
|
-
readonly user: "user";
|
|
1477
|
-
readonly assistant: "assistant";
|
|
1478
|
-
};
|
|
1479
1474
|
|
|
1480
1475
|
declare const OpenAIChatModelModalities: ChatModelSchemaType["modalities"];
|
|
1481
1476
|
declare const OpenAIChatModelModalitiesEnum: z.ZodEnum<["text", "image", "tool-call", "tool-response"]>;
|
|
@@ -1986,7 +1981,7 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
1986
1981
|
}[] | undefined;
|
|
1987
1982
|
refusal?: string | null | undefined;
|
|
1988
1983
|
}>, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>;
|
|
1989
|
-
logprobs: z.ZodNullable<z.ZodObject<{
|
|
1984
|
+
logprobs: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1990
1985
|
content: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
|
|
1991
1986
|
token: z.ZodString;
|
|
1992
1987
|
logprob: z.ZodNumber;
|
|
@@ -2103,10 +2098,25 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
2103
2098
|
logprob: number;
|
|
2104
2099
|
bytes: number[] | null;
|
|
2105
2100
|
}[] | null | undefined;
|
|
2106
|
-
}
|
|
2101
|
+
}>>>;
|
|
2107
2102
|
finish_reason: z.ZodNullable<z.ZodString>;
|
|
2108
2103
|
}, "strip", z.ZodTypeAny, {
|
|
2109
|
-
|
|
2104
|
+
index: number;
|
|
2105
|
+
finish_reason: string | null;
|
|
2106
|
+
delta: {
|
|
2107
|
+
content?: string | null | undefined;
|
|
2108
|
+
tool_calls?: {
|
|
2109
|
+
index: number;
|
|
2110
|
+
function?: {
|
|
2111
|
+
name?: string | undefined;
|
|
2112
|
+
arguments?: string | undefined;
|
|
2113
|
+
} | undefined;
|
|
2114
|
+
type?: "function" | undefined;
|
|
2115
|
+
id?: string | undefined;
|
|
2116
|
+
}[] | undefined;
|
|
2117
|
+
refusal?: string | null | undefined;
|
|
2118
|
+
} | {};
|
|
2119
|
+
logprobs?: {
|
|
2110
2120
|
content?: {
|
|
2111
2121
|
top_logprobs: {
|
|
2112
2122
|
token: string;
|
|
@@ -2127,7 +2137,8 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
2127
2137
|
logprob: number;
|
|
2128
2138
|
bytes: number[] | null;
|
|
2129
2139
|
}[] | null | undefined;
|
|
2130
|
-
} | null;
|
|
2140
|
+
} | null | undefined;
|
|
2141
|
+
}, {
|
|
2131
2142
|
index: number;
|
|
2132
2143
|
finish_reason: string | null;
|
|
2133
2144
|
delta: {
|
|
@@ -2143,8 +2154,7 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
2143
2154
|
}[] | undefined;
|
|
2144
2155
|
refusal?: string | null | undefined;
|
|
2145
2156
|
} | {};
|
|
2146
|
-
|
|
2147
|
-
logprobs: {
|
|
2157
|
+
logprobs?: {
|
|
2148
2158
|
content?: {
|
|
2149
2159
|
top_logprobs: {
|
|
2150
2160
|
token: string;
|
|
@@ -2165,22 +2175,7 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
2165
2175
|
logprob: number;
|
|
2166
2176
|
bytes: number[] | null;
|
|
2167
2177
|
}[] | null | undefined;
|
|
2168
|
-
} | null;
|
|
2169
|
-
index: number;
|
|
2170
|
-
finish_reason: string | null;
|
|
2171
|
-
delta: {
|
|
2172
|
-
content?: string | null | undefined;
|
|
2173
|
-
tool_calls?: {
|
|
2174
|
-
index: number;
|
|
2175
|
-
function?: {
|
|
2176
|
-
name?: string | undefined;
|
|
2177
|
-
arguments?: string | undefined;
|
|
2178
|
-
} | undefined;
|
|
2179
|
-
type?: "function" | undefined;
|
|
2180
|
-
id?: string | undefined;
|
|
2181
|
-
}[] | undefined;
|
|
2182
|
-
refusal?: string | null | undefined;
|
|
2183
|
-
} | {};
|
|
2178
|
+
} | null | undefined;
|
|
2184
2179
|
}>, "many">;
|
|
2185
2180
|
usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
2186
2181
|
prompt_tokens: z.ZodNumber;
|
|
@@ -2198,7 +2193,22 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
2198
2193
|
}, "strip", z.ZodTypeAny, {
|
|
2199
2194
|
object: string;
|
|
2200
2195
|
choices: {
|
|
2201
|
-
|
|
2196
|
+
index: number;
|
|
2197
|
+
finish_reason: string | null;
|
|
2198
|
+
delta: {
|
|
2199
|
+
content?: string | null | undefined;
|
|
2200
|
+
tool_calls?: {
|
|
2201
|
+
index: number;
|
|
2202
|
+
function?: {
|
|
2203
|
+
name?: string | undefined;
|
|
2204
|
+
arguments?: string | undefined;
|
|
2205
|
+
} | undefined;
|
|
2206
|
+
type?: "function" | undefined;
|
|
2207
|
+
id?: string | undefined;
|
|
2208
|
+
}[] | undefined;
|
|
2209
|
+
refusal?: string | null | undefined;
|
|
2210
|
+
} | {};
|
|
2211
|
+
logprobs?: {
|
|
2202
2212
|
content?: {
|
|
2203
2213
|
top_logprobs: {
|
|
2204
2214
|
token: string;
|
|
@@ -2219,7 +2229,20 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
2219
2229
|
logprob: number;
|
|
2220
2230
|
bytes: number[] | null;
|
|
2221
2231
|
}[] | null | undefined;
|
|
2222
|
-
} | null;
|
|
2232
|
+
} | null | undefined;
|
|
2233
|
+
}[];
|
|
2234
|
+
id: string;
|
|
2235
|
+
model: string;
|
|
2236
|
+
created: number;
|
|
2237
|
+
system_fingerprint?: string | null | undefined;
|
|
2238
|
+
usage?: {
|
|
2239
|
+
prompt_tokens: number;
|
|
2240
|
+
completion_tokens: number;
|
|
2241
|
+
total_tokens: number;
|
|
2242
|
+
} | null | undefined;
|
|
2243
|
+
}, {
|
|
2244
|
+
object: string;
|
|
2245
|
+
choices: {
|
|
2223
2246
|
index: number;
|
|
2224
2247
|
finish_reason: string | null;
|
|
2225
2248
|
delta: {
|
|
@@ -2235,20 +2258,7 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
2235
2258
|
}[] | undefined;
|
|
2236
2259
|
refusal?: string | null | undefined;
|
|
2237
2260
|
} | {};
|
|
2238
|
-
|
|
2239
|
-
id: string;
|
|
2240
|
-
model: string;
|
|
2241
|
-
created: number;
|
|
2242
|
-
system_fingerprint?: string | null | undefined;
|
|
2243
|
-
usage?: {
|
|
2244
|
-
prompt_tokens: number;
|
|
2245
|
-
completion_tokens: number;
|
|
2246
|
-
total_tokens: number;
|
|
2247
|
-
} | null | undefined;
|
|
2248
|
-
}, {
|
|
2249
|
-
object: string;
|
|
2250
|
-
choices: {
|
|
2251
|
-
logprobs: {
|
|
2261
|
+
logprobs?: {
|
|
2252
2262
|
content?: {
|
|
2253
2263
|
top_logprobs: {
|
|
2254
2264
|
token: string;
|
|
@@ -2269,22 +2279,7 @@ declare const OpenAIStreamChatResponse: z.ZodObject<{
|
|
|
2269
2279
|
logprob: number;
|
|
2270
2280
|
bytes: number[] | null;
|
|
2271
2281
|
}[] | null | undefined;
|
|
2272
|
-
} | null;
|
|
2273
|
-
index: number;
|
|
2274
|
-
finish_reason: string | null;
|
|
2275
|
-
delta: {
|
|
2276
|
-
content?: string | null | undefined;
|
|
2277
|
-
tool_calls?: {
|
|
2278
|
-
index: number;
|
|
2279
|
-
function?: {
|
|
2280
|
-
name?: string | undefined;
|
|
2281
|
-
arguments?: string | undefined;
|
|
2282
|
-
} | undefined;
|
|
2283
|
-
type?: "function" | undefined;
|
|
2284
|
-
id?: string | undefined;
|
|
2285
|
-
}[] | undefined;
|
|
2286
|
-
refusal?: string | null | undefined;
|
|
2287
|
-
} | {};
|
|
2282
|
+
} | null | undefined;
|
|
2288
2283
|
}[];
|
|
2289
2284
|
id: string;
|
|
2290
2285
|
model: string;
|
|
@@ -2750,483 +2745,60 @@ declare const OpenAIChatRequestMessage: z.ZodUnion<[z.ZodObject<{
|
|
|
2750
2745
|
function: {
|
|
2751
2746
|
name: string;
|
|
2752
2747
|
arguments: string;
|
|
2753
|
-
};
|
|
2754
|
-
type: "function";
|
|
2755
|
-
id: string;
|
|
2756
|
-
}, {
|
|
2757
|
-
function: {
|
|
2758
|
-
name: string;
|
|
2759
|
-
arguments: string;
|
|
2760
|
-
};
|
|
2761
|
-
type: "function";
|
|
2762
|
-
id: string;
|
|
2763
|
-
}>, "many">>;
|
|
2764
|
-
}, "strip", z.ZodTypeAny, {
|
|
2765
|
-
role: "assistant";
|
|
2766
|
-
content?: string | {
|
|
2767
|
-
type: "text";
|
|
2768
|
-
text: string;
|
|
2769
|
-
}[] | undefined;
|
|
2770
|
-
tool_calls?: {
|
|
2771
|
-
function: {
|
|
2772
|
-
name: string;
|
|
2773
|
-
arguments: string;
|
|
2774
|
-
};
|
|
2775
|
-
type: "function";
|
|
2776
|
-
id: string;
|
|
2777
|
-
}[] | undefined;
|
|
2778
|
-
}, {
|
|
2779
|
-
role: "assistant";
|
|
2780
|
-
content?: string | {
|
|
2781
|
-
type: "text";
|
|
2782
|
-
text: string;
|
|
2783
|
-
}[] | undefined;
|
|
2784
|
-
tool_calls?: {
|
|
2785
|
-
function: {
|
|
2786
|
-
name: string;
|
|
2787
|
-
arguments: string;
|
|
2788
|
-
};
|
|
2789
|
-
type: "function";
|
|
2790
|
-
id: string;
|
|
2791
|
-
}[] | undefined;
|
|
2792
|
-
}>, z.ZodObject<{
|
|
2793
|
-
role: z.ZodLiteral<"tool">;
|
|
2794
|
-
tool_call_id: z.ZodString;
|
|
2795
|
-
content: z.ZodString;
|
|
2796
|
-
}, "strip", z.ZodTypeAny, {
|
|
2797
|
-
role: "tool";
|
|
2798
|
-
content: string;
|
|
2799
|
-
tool_call_id: string;
|
|
2800
|
-
}, {
|
|
2801
|
-
role: "tool";
|
|
2802
|
-
content: string;
|
|
2803
|
-
tool_call_id: string;
|
|
2804
|
-
}>]>;
|
|
2805
|
-
type OpenAIChatRequestMessageType = z.infer<typeof OpenAIChatRequestMessage>;
|
|
2806
|
-
declare const OpenAIChatRequest: z.ZodObject<{
|
|
2807
|
-
model: z.ZodOptional<z.ZodString>;
|
|
2808
|
-
messages: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2809
|
-
role: z.ZodLiteral<"system">;
|
|
2810
|
-
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
|
|
2811
|
-
text: z.ZodString;
|
|
2812
|
-
type: z.ZodLiteral<"text">;
|
|
2813
|
-
}, "strip", z.ZodTypeAny, {
|
|
2814
|
-
type: "text";
|
|
2815
|
-
text: string;
|
|
2816
|
-
}, {
|
|
2817
|
-
type: "text";
|
|
2818
|
-
text: string;
|
|
2819
|
-
}>, "many">]>;
|
|
2820
|
-
}, "strip", z.ZodTypeAny, {
|
|
2821
|
-
role: "system";
|
|
2822
|
-
content: string | {
|
|
2823
|
-
type: "text";
|
|
2824
|
-
text: string;
|
|
2825
|
-
}[];
|
|
2826
|
-
}, {
|
|
2827
|
-
role: "system";
|
|
2828
|
-
content: string | {
|
|
2829
|
-
type: "text";
|
|
2830
|
-
text: string;
|
|
2831
|
-
}[];
|
|
2832
|
-
}>, z.ZodObject<{
|
|
2833
|
-
role: z.ZodLiteral<"user">;
|
|
2834
|
-
content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
2835
|
-
text: z.ZodString;
|
|
2836
|
-
type: z.ZodLiteral<"text">;
|
|
2837
|
-
}, "strip", z.ZodTypeAny, {
|
|
2838
|
-
type: "text";
|
|
2839
|
-
text: string;
|
|
2840
|
-
}, {
|
|
2841
|
-
type: "text";
|
|
2842
|
-
text: string;
|
|
2843
|
-
}>, z.ZodObject<{
|
|
2844
|
-
type: z.ZodLiteral<"image_url">;
|
|
2845
|
-
image_url: z.ZodObject<{
|
|
2846
|
-
url: z.ZodString;
|
|
2847
|
-
detail: z.ZodOptional<z.ZodEnum<["low", "high", "auto"]>>;
|
|
2848
|
-
}, "strip", z.ZodTypeAny, {
|
|
2849
|
-
url: string;
|
|
2850
|
-
detail?: "auto" | "low" | "high" | undefined;
|
|
2851
|
-
}, {
|
|
2852
|
-
url: string;
|
|
2853
|
-
detail?: "auto" | "low" | "high" | undefined;
|
|
2854
|
-
}>;
|
|
2855
|
-
}, "strip", z.ZodTypeAny, {
|
|
2856
|
-
type: "image_url";
|
|
2857
|
-
image_url: {
|
|
2858
|
-
url: string;
|
|
2859
|
-
detail?: "auto" | "low" | "high" | undefined;
|
|
2860
|
-
};
|
|
2861
|
-
}, {
|
|
2862
|
-
type: "image_url";
|
|
2863
|
-
image_url: {
|
|
2864
|
-
url: string;
|
|
2865
|
-
detail?: "auto" | "low" | "high" | undefined;
|
|
2866
|
-
};
|
|
2867
|
-
}>]>, "many">]>;
|
|
2868
|
-
}, "strip", z.ZodTypeAny, {
|
|
2869
|
-
role: "user";
|
|
2870
|
-
content: string | ({
|
|
2871
|
-
type: "text";
|
|
2872
|
-
text: string;
|
|
2873
|
-
} | {
|
|
2874
|
-
type: "image_url";
|
|
2875
|
-
image_url: {
|
|
2876
|
-
url: string;
|
|
2877
|
-
detail?: "auto" | "low" | "high" | undefined;
|
|
2878
|
-
};
|
|
2879
|
-
})[];
|
|
2880
|
-
}, {
|
|
2881
|
-
role: "user";
|
|
2882
|
-
content: string | ({
|
|
2883
|
-
type: "text";
|
|
2884
|
-
text: string;
|
|
2885
|
-
} | {
|
|
2886
|
-
type: "image_url";
|
|
2887
|
-
image_url: {
|
|
2888
|
-
url: string;
|
|
2889
|
-
detail?: "auto" | "low" | "high" | undefined;
|
|
2890
|
-
};
|
|
2891
|
-
})[];
|
|
2892
|
-
}>, z.ZodObject<{
|
|
2893
|
-
role: z.ZodLiteral<"assistant">;
|
|
2894
|
-
content: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
|
|
2895
|
-
text: z.ZodString;
|
|
2896
|
-
type: z.ZodLiteral<"text">;
|
|
2897
|
-
}, "strip", z.ZodTypeAny, {
|
|
2898
|
-
type: "text";
|
|
2899
|
-
text: string;
|
|
2900
|
-
}, {
|
|
2901
|
-
type: "text";
|
|
2902
|
-
text: string;
|
|
2903
|
-
}>, "many">]>>;
|
|
2904
|
-
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2905
|
-
id: z.ZodString;
|
|
2906
|
-
type: z.ZodLiteral<"function">;
|
|
2907
|
-
function: z.ZodObject<{
|
|
2908
|
-
name: z.ZodString;
|
|
2909
|
-
arguments: z.ZodString;
|
|
2910
|
-
}, "strip", z.ZodTypeAny, {
|
|
2911
|
-
name: string;
|
|
2912
|
-
arguments: string;
|
|
2913
|
-
}, {
|
|
2914
|
-
name: string;
|
|
2915
|
-
arguments: string;
|
|
2916
|
-
}>;
|
|
2917
|
-
}, "strip", z.ZodTypeAny, {
|
|
2918
|
-
function: {
|
|
2919
|
-
name: string;
|
|
2920
|
-
arguments: string;
|
|
2921
|
-
};
|
|
2922
|
-
type: "function";
|
|
2923
|
-
id: string;
|
|
2924
|
-
}, {
|
|
2925
|
-
function: {
|
|
2926
|
-
name: string;
|
|
2927
|
-
arguments: string;
|
|
2928
|
-
};
|
|
2929
|
-
type: "function";
|
|
2930
|
-
id: string;
|
|
2931
|
-
}>, "many">>;
|
|
2932
|
-
}, "strip", z.ZodTypeAny, {
|
|
2933
|
-
role: "assistant";
|
|
2934
|
-
content?: string | {
|
|
2935
|
-
type: "text";
|
|
2936
|
-
text: string;
|
|
2937
|
-
}[] | undefined;
|
|
2938
|
-
tool_calls?: {
|
|
2939
|
-
function: {
|
|
2940
|
-
name: string;
|
|
2941
|
-
arguments: string;
|
|
2942
|
-
};
|
|
2943
|
-
type: "function";
|
|
2944
|
-
id: string;
|
|
2945
|
-
}[] | undefined;
|
|
2946
|
-
}, {
|
|
2947
|
-
role: "assistant";
|
|
2948
|
-
content?: string | {
|
|
2949
|
-
type: "text";
|
|
2950
|
-
text: string;
|
|
2951
|
-
}[] | undefined;
|
|
2952
|
-
tool_calls?: {
|
|
2953
|
-
function: {
|
|
2954
|
-
name: string;
|
|
2955
|
-
arguments: string;
|
|
2956
|
-
};
|
|
2957
|
-
type: "function";
|
|
2958
|
-
id: string;
|
|
2959
|
-
}[] | undefined;
|
|
2960
|
-
}>, z.ZodObject<{
|
|
2961
|
-
role: z.ZodLiteral<"tool">;
|
|
2962
|
-
tool_call_id: z.ZodString;
|
|
2963
|
-
content: z.ZodString;
|
|
2964
|
-
}, "strip", z.ZodTypeAny, {
|
|
2965
|
-
role: "tool";
|
|
2966
|
-
content: string;
|
|
2967
|
-
tool_call_id: string;
|
|
2968
|
-
}, {
|
|
2969
|
-
role: "tool";
|
|
2970
|
-
content: string;
|
|
2971
|
-
tool_call_id: string;
|
|
2972
|
-
}>]>, "many">;
|
|
2973
|
-
frequency_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2974
|
-
logprobs: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2975
|
-
top_logprobs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2976
|
-
max_completion_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2977
|
-
presence_penalty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2978
|
-
response_format: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
2979
|
-
type: z.ZodEnum<["text", "json_object"]>;
|
|
2980
|
-
}, "strip", z.ZodTypeAny, {
|
|
2981
|
-
type: "text" | "json_object";
|
|
2982
|
-
}, {
|
|
2983
|
-
type: "text" | "json_object";
|
|
2984
|
-
}>, z.ZodObject<{
|
|
2985
|
-
type: z.ZodLiteral<"json_schema">;
|
|
2986
|
-
json_schema: z.ZodObject<{
|
|
2987
|
-
name: z.ZodString;
|
|
2988
|
-
description: z.ZodOptional<z.ZodString>;
|
|
2989
|
-
strict: z.ZodOptional<z.ZodBoolean>;
|
|
2990
|
-
schema: z.ZodAny;
|
|
2991
|
-
}, "strip", z.ZodTypeAny, {
|
|
2992
|
-
name: string;
|
|
2993
|
-
description?: string | undefined;
|
|
2994
|
-
strict?: boolean | undefined;
|
|
2995
|
-
schema?: any;
|
|
2996
|
-
}, {
|
|
2997
|
-
name: string;
|
|
2998
|
-
description?: string | undefined;
|
|
2999
|
-
strict?: boolean | undefined;
|
|
3000
|
-
schema?: any;
|
|
3001
|
-
}>;
|
|
3002
|
-
}, "strip", z.ZodTypeAny, {
|
|
3003
|
-
type: "json_schema";
|
|
3004
|
-
json_schema: {
|
|
3005
|
-
name: string;
|
|
3006
|
-
description?: string | undefined;
|
|
3007
|
-
strict?: boolean | undefined;
|
|
3008
|
-
schema?: any;
|
|
3009
|
-
};
|
|
3010
|
-
}, {
|
|
3011
|
-
type: "json_schema";
|
|
3012
|
-
json_schema: {
|
|
3013
|
-
name: string;
|
|
3014
|
-
description?: string | undefined;
|
|
3015
|
-
strict?: boolean | undefined;
|
|
3016
|
-
schema?: any;
|
|
3017
|
-
};
|
|
3018
|
-
}>]>>;
|
|
3019
|
-
seed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3020
|
-
stop: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
3021
|
-
temperature: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3022
|
-
top_p: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3023
|
-
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3024
|
-
type: z.ZodLiteral<"function">;
|
|
3025
|
-
function: z.ZodObject<{
|
|
3026
|
-
name: z.ZodString;
|
|
3027
|
-
description: z.ZodOptional<z.ZodString>;
|
|
3028
|
-
strict: z.ZodOptional<z.ZodBoolean>;
|
|
3029
|
-
parameters: z.ZodAny;
|
|
3030
|
-
}, "strip", z.ZodTypeAny, {
|
|
3031
|
-
name: string;
|
|
3032
|
-
description?: string | undefined;
|
|
3033
|
-
strict?: boolean | undefined;
|
|
3034
|
-
parameters?: any;
|
|
3035
|
-
}, {
|
|
3036
|
-
name: string;
|
|
3037
|
-
description?: string | undefined;
|
|
3038
|
-
strict?: boolean | undefined;
|
|
3039
|
-
parameters?: any;
|
|
3040
|
-
}>;
|
|
3041
|
-
}, "strip", z.ZodTypeAny, {
|
|
3042
|
-
function: {
|
|
3043
|
-
name: string;
|
|
3044
|
-
description?: string | undefined;
|
|
3045
|
-
strict?: boolean | undefined;
|
|
3046
|
-
parameters?: any;
|
|
3047
|
-
};
|
|
3048
|
-
type: "function";
|
|
3049
|
-
}, {
|
|
3050
|
-
function: {
|
|
3051
|
-
name: string;
|
|
3052
|
-
description?: string | undefined;
|
|
3053
|
-
strict?: boolean | undefined;
|
|
3054
|
-
parameters?: any;
|
|
3055
|
-
};
|
|
3056
|
-
type: "function";
|
|
3057
|
-
}>, "many">>;
|
|
3058
|
-
tool_choice: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["none", "auto", "required"]>, z.ZodObject<{
|
|
3059
|
-
type: z.ZodLiteral<"function">;
|
|
3060
|
-
function: z.ZodObject<{
|
|
3061
|
-
name: z.ZodString;
|
|
3062
|
-
}, "strip", z.ZodTypeAny, {
|
|
3063
|
-
name: string;
|
|
3064
|
-
}, {
|
|
3065
|
-
name: string;
|
|
3066
|
-
}>;
|
|
3067
|
-
}, "strip", z.ZodTypeAny, {
|
|
3068
|
-
function: {
|
|
3069
|
-
name: string;
|
|
3070
|
-
};
|
|
3071
|
-
type: "function";
|
|
3072
|
-
}, {
|
|
3073
|
-
function: {
|
|
3074
|
-
name: string;
|
|
3075
|
-
};
|
|
3076
|
-
type: "function";
|
|
3077
|
-
}>]>>;
|
|
3078
|
-
}, "strip", z.ZodTypeAny, {
|
|
3079
|
-
messages: ({
|
|
3080
|
-
role: "system";
|
|
3081
|
-
content: string | {
|
|
3082
|
-
type: "text";
|
|
3083
|
-
text: string;
|
|
3084
|
-
}[];
|
|
3085
|
-
} | {
|
|
3086
|
-
role: "user";
|
|
3087
|
-
content: string | ({
|
|
3088
|
-
type: "text";
|
|
3089
|
-
text: string;
|
|
3090
|
-
} | {
|
|
3091
|
-
type: "image_url";
|
|
3092
|
-
image_url: {
|
|
3093
|
-
url: string;
|
|
3094
|
-
detail?: "auto" | "low" | "high" | undefined;
|
|
3095
|
-
};
|
|
3096
|
-
})[];
|
|
3097
|
-
} | {
|
|
3098
|
-
role: "assistant";
|
|
3099
|
-
content?: string | {
|
|
3100
|
-
type: "text";
|
|
3101
|
-
text: string;
|
|
3102
|
-
}[] | undefined;
|
|
3103
|
-
tool_calls?: {
|
|
3104
|
-
function: {
|
|
3105
|
-
name: string;
|
|
3106
|
-
arguments: string;
|
|
3107
|
-
};
|
|
3108
|
-
type: "function";
|
|
3109
|
-
id: string;
|
|
3110
|
-
}[] | undefined;
|
|
3111
|
-
} | {
|
|
3112
|
-
role: "tool";
|
|
3113
|
-
content: string;
|
|
3114
|
-
tool_call_id: string;
|
|
3115
|
-
})[];
|
|
3116
|
-
temperature?: number | null | undefined;
|
|
3117
|
-
top_p?: number | null | undefined;
|
|
3118
|
-
frequency_penalty?: number | null | undefined;
|
|
3119
|
-
presence_penalty?: number | null | undefined;
|
|
3120
|
-
seed?: number | null | undefined;
|
|
3121
|
-
logprobs?: boolean | null | undefined;
|
|
3122
|
-
top_logprobs?: number | null | undefined;
|
|
3123
|
-
tool_choice?: "auto" | "required" | "none" | {
|
|
3124
|
-
function: {
|
|
3125
|
-
name: string;
|
|
3126
|
-
};
|
|
3127
|
-
type: "function";
|
|
3128
|
-
} | undefined;
|
|
3129
|
-
max_completion_tokens?: number | null | undefined;
|
|
3130
|
-
stop?: string | string[] | null | undefined;
|
|
3131
|
-
response_format?: {
|
|
3132
|
-
type: "text" | "json_object";
|
|
3133
|
-
} | {
|
|
3134
|
-
type: "json_schema";
|
|
3135
|
-
json_schema: {
|
|
3136
|
-
name: string;
|
|
3137
|
-
description?: string | undefined;
|
|
3138
|
-
strict?: boolean | undefined;
|
|
3139
|
-
schema?: any;
|
|
3140
|
-
};
|
|
3141
|
-
} | undefined;
|
|
3142
|
-
model?: string | undefined;
|
|
3143
|
-
tools?: {
|
|
2748
|
+
};
|
|
2749
|
+
type: "function";
|
|
2750
|
+
id: string;
|
|
2751
|
+
}, {
|
|
3144
2752
|
function: {
|
|
3145
2753
|
name: string;
|
|
3146
|
-
|
|
3147
|
-
strict?: boolean | undefined;
|
|
3148
|
-
parameters?: any;
|
|
2754
|
+
arguments: string;
|
|
3149
2755
|
};
|
|
3150
2756
|
type: "function";
|
|
2757
|
+
id: string;
|
|
2758
|
+
}>, "many">>;
|
|
2759
|
+
}, "strip", z.ZodTypeAny, {
|
|
2760
|
+
role: "assistant";
|
|
2761
|
+
content?: string | {
|
|
2762
|
+
type: "text";
|
|
2763
|
+
text: string;
|
|
3151
2764
|
}[] | undefined;
|
|
3152
|
-
|
|
3153
|
-
messages: ({
|
|
3154
|
-
role: "system";
|
|
3155
|
-
content: string | {
|
|
3156
|
-
type: "text";
|
|
3157
|
-
text: string;
|
|
3158
|
-
}[];
|
|
3159
|
-
} | {
|
|
3160
|
-
role: "user";
|
|
3161
|
-
content: string | ({
|
|
3162
|
-
type: "text";
|
|
3163
|
-
text: string;
|
|
3164
|
-
} | {
|
|
3165
|
-
type: "image_url";
|
|
3166
|
-
image_url: {
|
|
3167
|
-
url: string;
|
|
3168
|
-
detail?: "auto" | "low" | "high" | undefined;
|
|
3169
|
-
};
|
|
3170
|
-
})[];
|
|
3171
|
-
} | {
|
|
3172
|
-
role: "assistant";
|
|
3173
|
-
content?: string | {
|
|
3174
|
-
type: "text";
|
|
3175
|
-
text: string;
|
|
3176
|
-
}[] | undefined;
|
|
3177
|
-
tool_calls?: {
|
|
3178
|
-
function: {
|
|
3179
|
-
name: string;
|
|
3180
|
-
arguments: string;
|
|
3181
|
-
};
|
|
3182
|
-
type: "function";
|
|
3183
|
-
id: string;
|
|
3184
|
-
}[] | undefined;
|
|
3185
|
-
} | {
|
|
3186
|
-
role: "tool";
|
|
3187
|
-
content: string;
|
|
3188
|
-
tool_call_id: string;
|
|
3189
|
-
})[];
|
|
3190
|
-
temperature?: number | null | undefined;
|
|
3191
|
-
top_p?: number | null | undefined;
|
|
3192
|
-
frequency_penalty?: number | null | undefined;
|
|
3193
|
-
presence_penalty?: number | null | undefined;
|
|
3194
|
-
seed?: number | null | undefined;
|
|
3195
|
-
logprobs?: boolean | null | undefined;
|
|
3196
|
-
top_logprobs?: number | null | undefined;
|
|
3197
|
-
tool_choice?: "auto" | "required" | "none" | {
|
|
2765
|
+
tool_calls?: {
|
|
3198
2766
|
function: {
|
|
3199
2767
|
name: string;
|
|
2768
|
+
arguments: string;
|
|
3200
2769
|
};
|
|
3201
2770
|
type: "function";
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
description?: string | undefined;
|
|
3212
|
-
strict?: boolean | undefined;
|
|
3213
|
-
schema?: any;
|
|
3214
|
-
};
|
|
3215
|
-
} | undefined;
|
|
3216
|
-
model?: string | undefined;
|
|
3217
|
-
tools?: {
|
|
2771
|
+
id: string;
|
|
2772
|
+
}[] | undefined;
|
|
2773
|
+
}, {
|
|
2774
|
+
role: "assistant";
|
|
2775
|
+
content?: string | {
|
|
2776
|
+
type: "text";
|
|
2777
|
+
text: string;
|
|
2778
|
+
}[] | undefined;
|
|
2779
|
+
tool_calls?: {
|
|
3218
2780
|
function: {
|
|
3219
2781
|
name: string;
|
|
3220
|
-
|
|
3221
|
-
strict?: boolean | undefined;
|
|
3222
|
-
parameters?: any;
|
|
2782
|
+
arguments: string;
|
|
3223
2783
|
};
|
|
3224
2784
|
type: "function";
|
|
2785
|
+
id: string;
|
|
3225
2786
|
}[] | undefined;
|
|
3226
|
-
}
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
2787
|
+
}>, z.ZodObject<{
|
|
2788
|
+
role: z.ZodLiteral<"tool">;
|
|
2789
|
+
tool_call_id: z.ZodString;
|
|
2790
|
+
content: z.ZodString;
|
|
2791
|
+
}, "strip", z.ZodTypeAny, {
|
|
2792
|
+
role: "tool";
|
|
2793
|
+
content: string;
|
|
2794
|
+
tool_call_id: string;
|
|
2795
|
+
}, {
|
|
2796
|
+
role: "tool";
|
|
2797
|
+
content: string;
|
|
2798
|
+
tool_call_id: string;
|
|
2799
|
+
}>]>;
|
|
2800
|
+
type OpenAIChatRequestMessageType = z.infer<typeof OpenAIChatRequestMessage>;
|
|
2801
|
+
declare const OpenAIChatRequest: z.ZodObject<{
|
|
3230
2802
|
model: z.ZodOptional<z.ZodString>;
|
|
3231
2803
|
messages: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
3232
2804
|
role: z.ZodLiteral<"system">;
|
|
@@ -3647,7 +3219,7 @@ declare const OpenAIChatOSeriesRequest: z.ZodObject<{
|
|
|
3647
3219
|
type: "function";
|
|
3648
3220
|
}[] | undefined;
|
|
3649
3221
|
}>;
|
|
3650
|
-
type
|
|
3222
|
+
type OpenAIChatRequestType = z.infer<typeof OpenAIChatRequest>;
|
|
3651
3223
|
|
|
3652
3224
|
declare const BaseChatModelOptions: z.ZodObject<{
|
|
3653
3225
|
modelName: z.ZodString;
|
|
@@ -3721,29 +3293,6 @@ declare class BaseChatModel implements ChatModelV1<ChatModelSchemaType> {
|
|
|
3721
3293
|
getModelPricing(): ChatModelPriceType;
|
|
3722
3294
|
}
|
|
3723
3295
|
|
|
3724
|
-
declare class BaseOSeriesChatModel extends BaseChatModel {
|
|
3725
|
-
constructor(modelSchema: ChatModelSchemaType, options: BaseChatModelOptionsType);
|
|
3726
|
-
transformModelRequest(request: OpenAIChatOSeriesRequestType): {
|
|
3727
|
-
modelName: string | undefined;
|
|
3728
|
-
config: ConfigType;
|
|
3729
|
-
messages: MessageType[];
|
|
3730
|
-
tools: ToolType[] | undefined;
|
|
3731
|
-
};
|
|
3732
|
-
transformTools(tools: ToolType[]): ParamsType;
|
|
3733
|
-
getStreamChatUrl(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<UrlType>;
|
|
3734
|
-
getStreamChatHeaders(config?: ConfigType, messages?: MessageType[], tools?: ToolType[]): Promise<HeadersType>;
|
|
3735
|
-
getStreamChatData(config: ConfigType, messages: MessageType[], tools?: ToolType[]): Promise<ParamsType>;
|
|
3736
|
-
transformStreamChatResponseChunk(chunk: string, buffer: string): AsyncGenerator<{
|
|
3737
|
-
partialResponse: PartialChatResponseType;
|
|
3738
|
-
buffer: string;
|
|
3739
|
-
}>;
|
|
3740
|
-
transformProxyStreamChatResponseChunk(chunk: string, buffer: string, data?: any, headers?: Record<string, string>, query?: Record<string, string>): AsyncGenerator<{
|
|
3741
|
-
partialResponse: PartialChatResponseType;
|
|
3742
|
-
buffer: string;
|
|
3743
|
-
}>;
|
|
3744
|
-
getProxyStreamChatUrl(data?: any, headers?: Record<string, string>, query?: Record<string, string>): Promise<UrlType>;
|
|
3745
|
-
}
|
|
3746
|
-
|
|
3747
3296
|
declare const GPT_3_5_Turbo_0125Literal = "gpt-3.5-turbo-0125";
|
|
3748
3297
|
declare const GPT_3_5_Turbo_0125Schema: {
|
|
3749
3298
|
description: string;
|
|
@@ -5168,101 +4717,12 @@ declare class O1_2024_12_17 extends BaseChatModel {
|
|
|
5168
4717
|
constructor(options: O1_2024_12_17OptionsType);
|
|
5169
4718
|
}
|
|
5170
4719
|
|
|
5171
|
-
declare const
|
|
5172
|
-
declare const
|
|
5173
|
-
description: string;
|
|
5174
|
-
name: string;
|
|
5175
|
-
roles: Partial<Record<"user" | "assistant", string | undefined>>;
|
|
5176
|
-
modalities: ["text", ..."text"[]];
|
|
5177
|
-
maxInputTokens: number;
|
|
5178
|
-
maxOutputTokens: number;
|
|
5179
|
-
config: {
|
|
5180
|
-
def: Record<string, {
|
|
5181
|
-
type: "multi-string";
|
|
5182
|
-
param: string;
|
|
5183
|
-
title: string;
|
|
5184
|
-
description: string;
|
|
5185
|
-
max: number;
|
|
5186
|
-
} | {
|
|
5187
|
-
type: "object-schema";
|
|
5188
|
-
param: string;
|
|
5189
|
-
title: string;
|
|
5190
|
-
description: string;
|
|
5191
|
-
objectSchema?: any;
|
|
5192
|
-
} | {
|
|
5193
|
-
type: "range";
|
|
5194
|
-
param: string;
|
|
5195
|
-
title: string;
|
|
5196
|
-
description: string;
|
|
5197
|
-
max: number;
|
|
5198
|
-
default: number;
|
|
5199
|
-
min: number;
|
|
5200
|
-
step: number;
|
|
5201
|
-
} | {
|
|
5202
|
-
type: "select-boolean";
|
|
5203
|
-
param: string;
|
|
5204
|
-
title: string;
|
|
5205
|
-
description: string;
|
|
5206
|
-
default: boolean | null;
|
|
5207
|
-
} | {
|
|
5208
|
-
type: "select-string";
|
|
5209
|
-
param: string;
|
|
5210
|
-
title: string;
|
|
5211
|
-
description: string;
|
|
5212
|
-
default: string;
|
|
5213
|
-
choices: string[];
|
|
5214
|
-
}>;
|
|
5215
|
-
schema: z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, unknown, unknown>;
|
|
5216
|
-
};
|
|
5217
|
-
price: {
|
|
5218
|
-
modelName: string;
|
|
5219
|
-
currency: string;
|
|
5220
|
-
tokenRanges: {
|
|
5221
|
-
minTokens: number;
|
|
5222
|
-
prices: {
|
|
5223
|
-
base: {
|
|
5224
|
-
inputPricePerMillion: number;
|
|
5225
|
-
outputPricePerMillion: number;
|
|
5226
|
-
};
|
|
5227
|
-
};
|
|
5228
|
-
maxTokens?: number | null | undefined;
|
|
5229
|
-
}[];
|
|
5230
|
-
};
|
|
5231
|
-
maxReasoningTokens?: number | undefined;
|
|
5232
|
-
};
|
|
5233
|
-
declare const O1_Mini_2024_09_12Options: z.ZodObject<{
|
|
5234
|
-
modelName: z.ZodString;
|
|
5235
|
-
apiKey: z.ZodString;
|
|
5236
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
|
5237
|
-
completeChatUrl: z.ZodOptional<z.ZodString>;
|
|
5238
|
-
streamChatUrl: z.ZodOptional<z.ZodString>;
|
|
5239
|
-
organization: z.ZodOptional<z.ZodString>;
|
|
5240
|
-
}, "strip", z.ZodTypeAny, {
|
|
5241
|
-
modelName: string;
|
|
5242
|
-
apiKey: string;
|
|
5243
|
-
baseUrl?: string | undefined;
|
|
5244
|
-
completeChatUrl?: string | undefined;
|
|
5245
|
-
streamChatUrl?: string | undefined;
|
|
5246
|
-
organization?: string | undefined;
|
|
5247
|
-
}, {
|
|
5248
|
-
modelName: string;
|
|
5249
|
-
apiKey: string;
|
|
5250
|
-
baseUrl?: string | undefined;
|
|
5251
|
-
completeChatUrl?: string | undefined;
|
|
5252
|
-
streamChatUrl?: string | undefined;
|
|
5253
|
-
organization?: string | undefined;
|
|
5254
|
-
}>;
|
|
5255
|
-
type O1_Mini_2024_09_12OptionsType = z.infer<typeof O1_Mini_2024_09_12Options>;
|
|
5256
|
-
declare class O1_Mini_2024_09_12 extends BaseOSeriesChatModel {
|
|
5257
|
-
constructor(options: O1_Mini_2024_09_12OptionsType);
|
|
5258
|
-
}
|
|
5259
|
-
|
|
5260
|
-
declare const O1_MiniLiteral = "o1-mini";
|
|
5261
|
-
declare const O1_MiniSchema: {
|
|
4720
|
+
declare const O1Literal = "o1";
|
|
4721
|
+
declare const O1Schema: {
|
|
5262
4722
|
description: string;
|
|
5263
4723
|
name: string;
|
|
5264
|
-
roles: Partial<Record<"user" | "assistant", string | undefined>>;
|
|
5265
|
-
modalities: ["text", ..."text"[]];
|
|
4724
|
+
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
4725
|
+
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
5266
4726
|
maxInputTokens: number;
|
|
5267
4727
|
maxOutputTokens: number;
|
|
5268
4728
|
config: {
|
|
@@ -5319,7 +4779,7 @@ declare const O1_MiniSchema: {
|
|
|
5319
4779
|
};
|
|
5320
4780
|
maxReasoningTokens?: number | undefined;
|
|
5321
4781
|
};
|
|
5322
|
-
declare const
|
|
4782
|
+
declare const O1Options: z.ZodObject<{
|
|
5323
4783
|
modelName: z.ZodString;
|
|
5324
4784
|
apiKey: z.ZodString;
|
|
5325
4785
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -5341,17 +4801,17 @@ declare const O1_MiniOptions: z.ZodObject<{
|
|
|
5341
4801
|
streamChatUrl?: string | undefined;
|
|
5342
4802
|
organization?: string | undefined;
|
|
5343
4803
|
}>;
|
|
5344
|
-
type
|
|
5345
|
-
declare class
|
|
5346
|
-
constructor(options:
|
|
4804
|
+
type O1OptionsType = z.infer<typeof O1Options>;
|
|
4805
|
+
declare class O1 extends BaseChatModel {
|
|
4806
|
+
constructor(options: O1OptionsType);
|
|
5347
4807
|
}
|
|
5348
4808
|
|
|
5349
|
-
declare const
|
|
5350
|
-
declare const
|
|
4809
|
+
declare const O3_2025_04_16Literal = "o3-2025-04-16";
|
|
4810
|
+
declare const O3_2025_04_16Schema: {
|
|
5351
4811
|
description: string;
|
|
5352
4812
|
name: string;
|
|
5353
|
-
roles: Partial<Record<"user" | "assistant", string | undefined>>;
|
|
5354
|
-
modalities: ["text", ..."text"[]];
|
|
4813
|
+
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
4814
|
+
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
5355
4815
|
maxInputTokens: number;
|
|
5356
4816
|
maxOutputTokens: number;
|
|
5357
4817
|
config: {
|
|
@@ -5408,7 +4868,7 @@ declare const O1_PreviewSchema: {
|
|
|
5408
4868
|
};
|
|
5409
4869
|
maxReasoningTokens?: number | undefined;
|
|
5410
4870
|
};
|
|
5411
|
-
declare const
|
|
4871
|
+
declare const O3_2025_04_16Options: z.ZodObject<{
|
|
5412
4872
|
modelName: z.ZodString;
|
|
5413
4873
|
apiKey: z.ZodString;
|
|
5414
4874
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -5430,13 +4890,13 @@ declare const O1_PreviewOptions: z.ZodObject<{
|
|
|
5430
4890
|
streamChatUrl?: string | undefined;
|
|
5431
4891
|
organization?: string | undefined;
|
|
5432
4892
|
}>;
|
|
5433
|
-
type
|
|
5434
|
-
declare class
|
|
5435
|
-
constructor(options:
|
|
4893
|
+
type O3_2025_04_16OptionsType = z.infer<typeof O3_2025_04_16Options>;
|
|
4894
|
+
declare class O3_2025_04_16 extends BaseChatModel {
|
|
4895
|
+
constructor(options: O3_2025_04_16OptionsType);
|
|
5436
4896
|
}
|
|
5437
4897
|
|
|
5438
|
-
declare const
|
|
5439
|
-
declare const
|
|
4898
|
+
declare const O3Literal = "o3";
|
|
4899
|
+
declare const O3Schema: {
|
|
5440
4900
|
description: string;
|
|
5441
4901
|
name: string;
|
|
5442
4902
|
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
@@ -5497,7 +4957,7 @@ declare const O1Schema: {
|
|
|
5497
4957
|
};
|
|
5498
4958
|
maxReasoningTokens?: number | undefined;
|
|
5499
4959
|
};
|
|
5500
|
-
declare const
|
|
4960
|
+
declare const O3Options: z.ZodObject<{
|
|
5501
4961
|
modelName: z.ZodString;
|
|
5502
4962
|
apiKey: z.ZodString;
|
|
5503
4963
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -5519,17 +4979,17 @@ declare const O1Options: z.ZodObject<{
|
|
|
5519
4979
|
streamChatUrl?: string | undefined;
|
|
5520
4980
|
organization?: string | undefined;
|
|
5521
4981
|
}>;
|
|
5522
|
-
type
|
|
5523
|
-
declare class
|
|
5524
|
-
constructor(options:
|
|
4982
|
+
type O3OptionsType = z.infer<typeof O3Options>;
|
|
4983
|
+
declare class O3 extends BaseChatModel {
|
|
4984
|
+
constructor(options: O3OptionsType);
|
|
5525
4985
|
}
|
|
5526
4986
|
|
|
5527
|
-
declare const
|
|
5528
|
-
declare const
|
|
4987
|
+
declare const O3MiniLiteral = "o3-mini";
|
|
4988
|
+
declare const O3MiniSchema: {
|
|
5529
4989
|
description: string;
|
|
5530
4990
|
name: string;
|
|
5531
4991
|
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
5532
|
-
modalities: ["text" | "
|
|
4992
|
+
modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
5533
4993
|
maxInputTokens: number;
|
|
5534
4994
|
maxOutputTokens: number;
|
|
5535
4995
|
config: {
|
|
@@ -5586,7 +5046,7 @@ declare const O3_2025_04_16Schema: {
|
|
|
5586
5046
|
};
|
|
5587
5047
|
maxReasoningTokens?: number | undefined;
|
|
5588
5048
|
};
|
|
5589
|
-
declare const
|
|
5049
|
+
declare const O3MiniOptions: z.ZodObject<{
|
|
5590
5050
|
modelName: z.ZodString;
|
|
5591
5051
|
apiKey: z.ZodString;
|
|
5592
5052
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -5608,17 +5068,17 @@ declare const O3_2025_04_16Options: z.ZodObject<{
|
|
|
5608
5068
|
streamChatUrl?: string | undefined;
|
|
5609
5069
|
organization?: string | undefined;
|
|
5610
5070
|
}>;
|
|
5611
|
-
type
|
|
5612
|
-
declare class
|
|
5613
|
-
constructor(options:
|
|
5071
|
+
type O3MiniOptionsType = z.infer<typeof O3MiniOptions>;
|
|
5072
|
+
declare class O3Mini extends BaseChatModel {
|
|
5073
|
+
constructor(options: O3MiniOptionsType);
|
|
5614
5074
|
}
|
|
5615
5075
|
|
|
5616
|
-
declare const
|
|
5617
|
-
declare const
|
|
5076
|
+
declare const O3Mini2025_01_31Literal = "o3-mini-2025-01-31";
|
|
5077
|
+
declare const O3Mini2025_01_31Schema: {
|
|
5618
5078
|
description: string;
|
|
5619
5079
|
name: string;
|
|
5620
5080
|
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
5621
|
-
modalities: ["text" | "
|
|
5081
|
+
modalities: ["text" | "tool-call" | "tool-response", ...("text" | "tool-call" | "tool-response")[]];
|
|
5622
5082
|
maxInputTokens: number;
|
|
5623
5083
|
maxOutputTokens: number;
|
|
5624
5084
|
config: {
|
|
@@ -5675,7 +5135,7 @@ declare const O3Schema: {
|
|
|
5675
5135
|
};
|
|
5676
5136
|
maxReasoningTokens?: number | undefined;
|
|
5677
5137
|
};
|
|
5678
|
-
declare const
|
|
5138
|
+
declare const O3Mini2025_01_31Options: z.ZodObject<{
|
|
5679
5139
|
modelName: z.ZodString;
|
|
5680
5140
|
apiKey: z.ZodString;
|
|
5681
5141
|
baseUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -5697,17 +5157,17 @@ declare const O3Options: z.ZodObject<{
|
|
|
5697
5157
|
streamChatUrl?: string | undefined;
|
|
5698
5158
|
organization?: string | undefined;
|
|
5699
5159
|
}>;
|
|
5700
|
-
type
|
|
5701
|
-
declare class
|
|
5702
|
-
constructor(options:
|
|
5160
|
+
type O3Mini2025_01_31OptionsType = z.infer<typeof O3Mini2025_01_31Options>;
|
|
5161
|
+
declare class O3Mini2025_01_31 extends BaseChatModel {
|
|
5162
|
+
constructor(options: O3Mini2025_01_31OptionsType);
|
|
5703
5163
|
}
|
|
5704
5164
|
|
|
5705
5165
|
declare const O4_Mini_2025_04_16Literal = "o4-mini-2025-04-16";
|
|
5706
5166
|
declare const O4_Mini_2025_04_16Schema: {
|
|
5707
5167
|
description: string;
|
|
5708
5168
|
name: string;
|
|
5709
|
-
roles: Partial<Record<"user" | "assistant", string | undefined>>;
|
|
5710
|
-
modalities: ["text", ..."text"[]];
|
|
5169
|
+
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
5170
|
+
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
5711
5171
|
maxInputTokens: number;
|
|
5712
5172
|
maxOutputTokens: number;
|
|
5713
5173
|
config: {
|
|
@@ -5787,7 +5247,7 @@ declare const O4_Mini_2025_04_16Options: z.ZodObject<{
|
|
|
5787
5247
|
organization?: string | undefined;
|
|
5788
5248
|
}>;
|
|
5789
5249
|
type O4_Mini_2025_04_16OptionsType = z.infer<typeof O4_Mini_2025_04_16Options>;
|
|
5790
|
-
declare class O4_Mini_2025_04_16 extends
|
|
5250
|
+
declare class O4_Mini_2025_04_16 extends BaseChatModel {
|
|
5791
5251
|
constructor(options: O4_Mini_2025_04_16OptionsType);
|
|
5792
5252
|
}
|
|
5793
5253
|
|
|
@@ -5795,8 +5255,8 @@ declare const O4_MiniLiteral = "o4-mini";
|
|
|
5795
5255
|
declare const O4_MiniSchema: {
|
|
5796
5256
|
description: string;
|
|
5797
5257
|
name: string;
|
|
5798
|
-
roles: Partial<Record<"user" | "assistant", string | undefined>>;
|
|
5799
|
-
modalities: ["text", ..."text"[]];
|
|
5258
|
+
roles: Partial<Record<"system" | "user" | "assistant" | "tool", string | undefined>>;
|
|
5259
|
+
modalities: ["text" | "image" | "tool-call" | "tool-response", ...("text" | "image" | "tool-call" | "tool-response")[]];
|
|
5800
5260
|
maxInputTokens: number;
|
|
5801
5261
|
maxOutputTokens: number;
|
|
5802
5262
|
config: {
|
|
@@ -5876,7 +5336,7 @@ declare const O4_MiniOptions: z.ZodObject<{
|
|
|
5876
5336
|
organization?: string | undefined;
|
|
5877
5337
|
}>;
|
|
5878
5338
|
type O4_MiniOptionsType = z.infer<typeof O4_MiniOptions>;
|
|
5879
|
-
declare class O4_Mini extends
|
|
5339
|
+
declare class O4_Mini extends BaseChatModel {
|
|
5880
5340
|
constructor(options: O4_MiniOptionsType);
|
|
5881
5341
|
}
|
|
5882
5342
|
|
|
@@ -6217,4 +5677,4 @@ declare class OpenAI<C extends BaseChatModelOptionsType, E extends BaseEmbedding
|
|
|
6217
5677
|
embeddingModel(options: E): EmbeddingModelV1;
|
|
6218
5678
|
}
|
|
6219
5679
|
|
|
6220
|
-
export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType,
|
|
5680
|
+
export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseEmbeddingModel, BaseEmbeddingModelOptions, type BaseEmbeddingModelOptionsType, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, ChatModelOSeriesConfigDef, ChatModelOSeriesConfigSchema, ChatModelResponseFormatConfigDef, ChatModelResponseFormatConfigSchema, ChatModelResponseSchemaConfigDef, ChatModelResponseSchemaConfigSchema, EmbeddingModelBaseConfigDef, EmbeddingModelBaseConfigSchema, EmbeddingModelDimensionsConfigDef, EmbeddingModelDimensionsConfigSchema, GPT_3_5_Turbo, GPT_3_5_TurboLiteral, GPT_3_5_TurboOptions, type GPT_3_5_TurboOptionsType, GPT_3_5_TurboSchema, GPT_3_5_Turbo_0125, GPT_3_5_Turbo_0125Literal, GPT_3_5_Turbo_0125Options, type GPT_3_5_Turbo_0125OptionsType, GPT_3_5_Turbo_0125Schema, GPT_3_5_Turbo_1106, GPT_3_5_Turbo_1106Literal, GPT_3_5_Turbo_1106Options, type GPT_3_5_Turbo_1106OptionsType, GPT_3_5_Turbo_1106Schema, GPT_4, GPT_4Literal, GPT_4Options, type GPT_4OptionsType, GPT_4Schema, GPT_4_0125_Preview, GPT_4_0125_PreviewLiteral, GPT_4_0125_PreviewOptions, type GPT_4_0125_PreviewOptionsType, GPT_4_0125_PreviewSchema, GPT_4_0613, GPT_4_0613Literal, GPT_4_0613Options, type GPT_4_0613OptionsType, GPT_4_0613Schema, GPT_4_1106_Preview, GPT_4_1106_PreviewLiteral, GPT_4_1106_PreviewOptions, type GPT_4_1106_PreviewOptionsType, GPT_4_1106_PreviewSchema, GPT_4_Turbo, GPT_4_TurboLiteral, GPT_4_TurboOptions, type GPT_4_TurboOptionsType, GPT_4_TurboSchema, GPT_4_Turbo_2024_04_09, GPT_4_Turbo_2024_04_09Literal, GPT_4_Turbo_2024_04_09Options, type GPT_4_Turbo_2024_04_09OptionsType, GPT_4_Turbo_2024_04_09Schema, GPT_4_Turbo_Preview, GPT_4_Turbo_PreviewLiteral, GPT_4_Turbo_PreviewOptions, type GPT_4_Turbo_PreviewOptionsType, GPT_4_Turbo_PreviewSchema, GPT_4o, GPT_4oLiteral, GPT_4oOptions, type GPT_4oOptionsType, GPT_4oSchema, GPT_4o_2024_05_13, GPT_4o_2024_05_13Literal, GPT_4o_2024_05_13Options, type GPT_4o_2024_05_13OptionsType, GPT_4o_2024_05_13Schema, GPT_4o_2024_08_06, GPT_4o_2024_08_06Literal, GPT_4o_2024_08_06Options, type GPT_4o_2024_08_06OptionsType, GPT_4o_2024_08_06Schema, GPT_4o_Mini, GPT_4o_MiniLiteral, GPT_4o_MiniOptions, type GPT_4o_MiniOptionsType, GPT_4o_MiniSchema, GPT_4o_Mini_2024_07_18, GPT_4o_Mini_2024_07_18Literal, GPT_4o_Mini_2024_07_18Options, type GPT_4o_Mini_2024_07_18OptionsType, GPT_4o_Mini_2024_07_18Schema, O1, O1Literal, O1Options, type O1OptionsType, O1Schema, O1_2024_12_17, O1_2024_12_17Literal, O1_2024_12_17Options, type O1_2024_12_17OptionsType, O1_2024_12_17Schema, O3, O3Literal, O3Mini, O3Mini2025_01_31, O3Mini2025_01_31Literal, O3Mini2025_01_31Options, type O3Mini2025_01_31OptionsType, O3Mini2025_01_31Schema, O3MiniLiteral, O3MiniOptions, type O3MiniOptionsType, O3MiniSchema, O3Options, type O3OptionsType, O3Schema, O3_2025_04_16, O3_2025_04_16Literal, O3_2025_04_16Options, type O3_2025_04_16OptionsType, O3_2025_04_16Schema, O4_Mini, O4_MiniLiteral, O4_MiniOptions, type O4_MiniOptionsType, O4_MiniSchema, O4_Mini_2025_04_16, O4_Mini_2025_04_16Literal, O4_Mini_2025_04_16Options, type O4_Mini_2025_04_16OptionsType, O4_Mini_2025_04_16Schema, OpenAI, OpenAIChatModelConfigs, OpenAIChatModelModalities, OpenAIChatModelModalitiesEnum, OpenAIChatModelRoles, OpenAIChatModelRolesMap, OpenAIChatModelTextModalities, OpenAIChatModelTextModalitiesEnum, OpenAIChatModelTextToolModalities, OpenAIChatModelTextToolModalitiesEnum, OpenAIChatRequest, OpenAIChatRequestAssistantMessage, type OpenAIChatRequestAssistantMessageType, OpenAIChatRequestImageContent, type OpenAIChatRequestImageContentType, OpenAIChatRequestMessage, type OpenAIChatRequestMessageType, OpenAIChatRequestResponseFormat, type OpenAIChatRequestResponseFormatType, OpenAIChatRequestSystemMessage, type OpenAIChatRequestSystemMessageType, OpenAIChatRequestTextContent, type OpenAIChatRequestTextContentType, OpenAIChatRequestTool, OpenAIChatRequestToolCallContent, type OpenAIChatRequestToolCallContentType, OpenAIChatRequestToolChoiceEnum, type OpenAIChatRequestToolChoiceEnumType, OpenAIChatRequestToolChoiceFunction, type OpenAIChatRequestToolChoiceFunctionType, OpenAIChatRequestToolMessage, type OpenAIChatRequestToolMessageType, type OpenAIChatRequestToolType, type OpenAIChatRequestType, OpenAIChatRequestUserMessage, type OpenAIChatRequestUserMessageType, OpenAICompleteChatResponse, type OpenAICompleteChatResponseType, OpenAIEmbeddingModelConfigs, OpenAIEmbeddingModelModalities, OpenAIEmbeddingModelModalitiesEnum, OpenAIEmbeddingRequest, OpenAIEmbeddingRequestInput, type OpenAIEmbeddingRequestInputType, type OpenAIEmbeddingRequestType, OpenAIGetEmbeddingsResponse, OpenAIStreamChatResponse, type OpenAIStreamChatResponseType, OpenAIToolCallsCompleteChatResponse, OpenAIToolCallsStreamChatResponse, ProviderLiteral, Text_Embedding_3_Large, Text_Embedding_3_LargeLiteral, Text_Embedding_3_LargeSchema, Text_Embedding_3_Large_Options, type Text_Embedding_3_Large_OptionsType, Text_Embedding_3_Small, Text_Embedding_3_SmallLiteral, Text_Embedding_3_SmallSchema, Text_Embedding_3_Small_Options, type Text_Embedding_3_Small_OptionsType, Text_Embedding_Ada002, Text_Embedding_Ada002Literal, Text_Embedding_Ada002Schema, Text_Embedding_Ada002_Options, type Text_Embedding_Ada002_OptionsType, dimensions, encodingFormat, frequencyPenalty, logProbs, maxTokens, presencePenalty, seed, stop, temperature, toolChoice, topLogProbs, topP };
|