@zenning/openai 1.4.2 → 1.4.4
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 +134 -122
- package/dist/index.d.ts +134 -122
- package/dist/index.js +575 -269
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +575 -269
- package/dist/index.mjs.map +1 -1
- package/internal/dist/index.js +500 -181
- package/internal/dist/index.js.map +1 -1
- package/internal/dist/index.mjs +500 -181
- package/internal/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -183,147 +183,159 @@ type OpenAITranscriptionModelId = 'whisper-1' | 'gpt-4o-mini-transcribe' | 'gpt-
|
|
|
183
183
|
|
|
184
184
|
type OpenAIResponsesModelId = 'o1' | 'o1-2024-12-17' | 'o1-mini' | 'o1-mini-2024-09-12' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | (string & {});
|
|
185
185
|
|
|
186
|
-
declare
|
|
187
|
-
|
|
186
|
+
declare function codeInterpreter(args?: {
|
|
187
|
+
container?: string | {
|
|
188
|
+
fileIds?: string[];
|
|
189
|
+
};
|
|
190
|
+
}): {
|
|
191
|
+
type: "provider-defined";
|
|
192
|
+
id: "openai.code_interpreter";
|
|
193
|
+
name: "code_interpreter";
|
|
194
|
+
args: {
|
|
195
|
+
container?: string | {
|
|
196
|
+
fileIds?: string[];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
declare function fileSearch(args?: {
|
|
202
|
+
vectorStoreIds?: string[];
|
|
203
|
+
maxNumResults?: number;
|
|
204
|
+
ranking?: {
|
|
205
|
+
ranker?: 'auto' | 'default-2024-08-21';
|
|
206
|
+
};
|
|
207
|
+
filters?: {
|
|
208
|
+
key: string;
|
|
209
|
+
type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
210
|
+
value: string | number | boolean;
|
|
211
|
+
} | {
|
|
212
|
+
type: 'and' | 'or';
|
|
213
|
+
filters: any[];
|
|
214
|
+
};
|
|
215
|
+
}): {
|
|
216
|
+
type: "provider-defined";
|
|
217
|
+
id: "openai.file_search";
|
|
218
|
+
name: "file_search";
|
|
219
|
+
args: {
|
|
220
|
+
vectorStoreIds?: string[];
|
|
221
|
+
maxNumResults?: number;
|
|
222
|
+
ranking?: {
|
|
223
|
+
ranker?: "auto" | "default-2024-08-21";
|
|
224
|
+
};
|
|
225
|
+
filters?: {
|
|
226
|
+
key: string;
|
|
227
|
+
type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
228
|
+
value: string | number | boolean;
|
|
229
|
+
} | {
|
|
230
|
+
type: "and" | "or";
|
|
231
|
+
filters: any[];
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
declare function webSearch(args?: {
|
|
237
|
+
filters?: {
|
|
238
|
+
allowedDomains?: string[];
|
|
239
|
+
};
|
|
188
240
|
searchContextSize?: 'low' | 'medium' | 'high';
|
|
189
241
|
userLocation?: {
|
|
190
|
-
type
|
|
242
|
+
type: 'approximate';
|
|
243
|
+
country?: string;
|
|
191
244
|
city?: string;
|
|
192
245
|
region?: string;
|
|
193
|
-
country?: string;
|
|
194
246
|
timezone?: string;
|
|
195
247
|
};
|
|
196
248
|
}): {
|
|
197
|
-
type:
|
|
198
|
-
id:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
type: "file" | "auto" | "code_interpreter";
|
|
213
|
-
files: string[];
|
|
214
|
-
containerId: string | null;
|
|
215
|
-
}>]>;
|
|
216
|
-
}, "strip", z.ZodTypeAny, {
|
|
217
|
-
container: string | {
|
|
218
|
-
type: "file" | "auto" | "code_interpreter";
|
|
219
|
-
files: string[];
|
|
220
|
-
containerId?: string | undefined;
|
|
221
|
-
};
|
|
222
|
-
}, {
|
|
223
|
-
container: string | {
|
|
224
|
-
type: "file" | "auto" | "code_interpreter";
|
|
225
|
-
files: string[];
|
|
226
|
-
containerId: string | null;
|
|
249
|
+
type: "provider-defined";
|
|
250
|
+
id: "openai.web_search";
|
|
251
|
+
name: "web_search";
|
|
252
|
+
args: {
|
|
253
|
+
filters?: {
|
|
254
|
+
allowedDomains?: string[];
|
|
255
|
+
};
|
|
256
|
+
searchContextSize?: "low" | "medium" | "high";
|
|
257
|
+
userLocation?: {
|
|
258
|
+
type: "approximate";
|
|
259
|
+
country?: string;
|
|
260
|
+
city?: string;
|
|
261
|
+
region?: string;
|
|
262
|
+
timezone?: string;
|
|
263
|
+
};
|
|
227
264
|
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
declare function webSearchPreview(args?: {
|
|
268
|
+
searchContextSize?: 'low' | 'medium' | 'high';
|
|
269
|
+
userLocation?: {
|
|
270
|
+
type: 'approximate';
|
|
271
|
+
country?: string;
|
|
272
|
+
city?: string;
|
|
273
|
+
region?: string;
|
|
274
|
+
timezone?: string;
|
|
234
275
|
};
|
|
235
276
|
}): {
|
|
236
|
-
type:
|
|
237
|
-
id:
|
|
277
|
+
type: "provider-defined";
|
|
278
|
+
id: "openai.web_search_preview";
|
|
279
|
+
name: "web_search_preview";
|
|
238
280
|
args: {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
type:
|
|
242
|
-
|
|
281
|
+
searchContextSize?: "low" | "medium" | "high";
|
|
282
|
+
userLocation?: {
|
|
283
|
+
type: "approximate";
|
|
284
|
+
country?: string;
|
|
285
|
+
city?: string;
|
|
286
|
+
region?: string;
|
|
287
|
+
timezone?: string;
|
|
243
288
|
};
|
|
244
289
|
};
|
|
245
|
-
parameters: typeof CodeInterpreterParameters;
|
|
246
290
|
};
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
type: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte"]>;
|
|
250
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
251
|
-
}, "strip", z.ZodTypeAny, {
|
|
252
|
-
value: string | number | boolean;
|
|
253
|
-
type: "gte" | "gt" | "lte" | "lt" | "ne" | "eq";
|
|
254
|
-
key: string;
|
|
255
|
-
}, {
|
|
256
|
-
value: string | number | boolean;
|
|
257
|
-
type: "gte" | "gt" | "lte" | "lt" | "ne" | "eq";
|
|
258
|
-
key: string;
|
|
259
|
-
}>, z.ZodType<any, z.ZodTypeDef, any>]>;
|
|
260
|
-
declare const fileSearchArgsSchema: z.ZodObject<{
|
|
291
|
+
|
|
292
|
+
declare const openaiTools: {
|
|
261
293
|
/**
|
|
262
|
-
*
|
|
294
|
+
* The Code Interpreter tool allows models to write and run Python code in a
|
|
295
|
+
* sandboxed environment to solve complex problems in domains like data analysis,
|
|
296
|
+
* coding, and math.
|
|
297
|
+
*
|
|
298
|
+
* @param container - The container to use for the code interpreter.
|
|
299
|
+
*
|
|
300
|
+
* Must have name `code_interpreter`.
|
|
263
301
|
*/
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
*
|
|
302
|
+
codeInterpreter: typeof codeInterpreter;
|
|
303
|
+
/**
|
|
304
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
305
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
306
|
+
* semantic and keyword search.
|
|
307
|
+
*
|
|
308
|
+
* Must have name `file_search`.
|
|
309
|
+
*
|
|
310
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
311
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
312
|
+
* @param ranking - The ranking options to use for the file search.
|
|
313
|
+
* @param filters - The filters to use for the file search.
|
|
267
314
|
*/
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
*
|
|
315
|
+
fileSearch: typeof fileSearch;
|
|
316
|
+
/**
|
|
317
|
+
* Web search allows models to access up-to-date information from the internet
|
|
318
|
+
* and provide answers with sourced citations.
|
|
319
|
+
*
|
|
320
|
+
* Must have name `web_search_preview`.
|
|
321
|
+
*
|
|
322
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
323
|
+
* @param userLocation - The user location to use for the web search.
|
|
324
|
+
*
|
|
325
|
+
* @deprecated Use `webSearch` instead.
|
|
271
326
|
*/
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
*
|
|
327
|
+
webSearchPreview: typeof webSearchPreview;
|
|
328
|
+
/**
|
|
329
|
+
* Web search allows models to access up-to-date information from the internet
|
|
330
|
+
* and provide answers with sourced citations.
|
|
331
|
+
*
|
|
332
|
+
* Must have name `web_search`.
|
|
333
|
+
*
|
|
334
|
+
* @param filters - The filters to use for the web search.
|
|
335
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
336
|
+
* @param userLocation - The user location to use for the web search.
|
|
281
337
|
*/
|
|
282
|
-
|
|
283
|
-
key: z.ZodString;
|
|
284
|
-
type: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte"]>;
|
|
285
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
286
|
-
}, "strip", z.ZodTypeAny, {
|
|
287
|
-
value: string | number | boolean;
|
|
288
|
-
type: "gte" | "gt" | "lte" | "lt" | "ne" | "eq";
|
|
289
|
-
key: string;
|
|
290
|
-
}, {
|
|
291
|
-
value: string | number | boolean;
|
|
292
|
-
type: "gte" | "gt" | "lte" | "lt" | "ne" | "eq";
|
|
293
|
-
key: string;
|
|
294
|
-
}>, z.ZodType<any, z.ZodTypeDef, any>]>>;
|
|
295
|
-
}, "strip", z.ZodTypeAny, {
|
|
296
|
-
vectorStoreIds?: string[] | undefined;
|
|
297
|
-
maxNumResults?: number | undefined;
|
|
298
|
-
ranking?: {
|
|
299
|
-
ranker?: "auto" | "default-2024-08-21" | undefined;
|
|
300
|
-
} | undefined;
|
|
301
|
-
filters?: any;
|
|
302
|
-
}, {
|
|
303
|
-
vectorStoreIds?: string[] | undefined;
|
|
304
|
-
maxNumResults?: number | undefined;
|
|
305
|
-
ranking?: {
|
|
306
|
-
ranker?: "auto" | "default-2024-08-21" | undefined;
|
|
307
|
-
} | undefined;
|
|
308
|
-
filters?: any;
|
|
309
|
-
}>;
|
|
310
|
-
declare function fileSearchTool({ vectorStoreIds, maxNumResults, ranking, filters, }?: {
|
|
311
|
-
vectorStoreIds?: string[];
|
|
312
|
-
maxNumResults?: number;
|
|
313
|
-
ranking?: {
|
|
314
|
-
ranker?: 'auto' | 'default-2024-08-21';
|
|
315
|
-
};
|
|
316
|
-
filters?: typeof filtersSchema;
|
|
317
|
-
}): {
|
|
318
|
-
type: 'provider-defined';
|
|
319
|
-
id: 'openai.file_search';
|
|
320
|
-
args: z.infer<typeof fileSearchArgsSchema>;
|
|
321
|
-
parameters: {};
|
|
322
|
-
};
|
|
323
|
-
declare const openaiTools: {
|
|
324
|
-
webSearchPreview: typeof webSearchPreviewTool;
|
|
325
|
-
codeInterpreter: typeof codeInterpreterTool;
|
|
326
|
-
fileSearch: typeof fileSearchTool;
|
|
338
|
+
webSearch: typeof webSearch;
|
|
327
339
|
};
|
|
328
340
|
|
|
329
341
|
type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
|
package/dist/index.d.ts
CHANGED
|
@@ -183,147 +183,159 @@ type OpenAITranscriptionModelId = 'whisper-1' | 'gpt-4o-mini-transcribe' | 'gpt-
|
|
|
183
183
|
|
|
184
184
|
type OpenAIResponsesModelId = 'o1' | 'o1-2024-12-17' | 'o1-mini' | 'o1-mini-2024-09-12' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o3' | 'o3-2025-04-16' | 'o4-mini' | 'o4-mini-2025-04-16' | 'gpt-4.1' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano' | 'gpt-4.1-nano-2025-04-14' | 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-11-20' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview' | 'gpt-4o-mini-search-preview-2025-03-11' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-4.5-preview' | 'gpt-4.5-preview-2025-02-27' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-1106' | 'chatgpt-4o-latest' | (string & {});
|
|
185
185
|
|
|
186
|
-
declare
|
|
187
|
-
|
|
186
|
+
declare function codeInterpreter(args?: {
|
|
187
|
+
container?: string | {
|
|
188
|
+
fileIds?: string[];
|
|
189
|
+
};
|
|
190
|
+
}): {
|
|
191
|
+
type: "provider-defined";
|
|
192
|
+
id: "openai.code_interpreter";
|
|
193
|
+
name: "code_interpreter";
|
|
194
|
+
args: {
|
|
195
|
+
container?: string | {
|
|
196
|
+
fileIds?: string[];
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
declare function fileSearch(args?: {
|
|
202
|
+
vectorStoreIds?: string[];
|
|
203
|
+
maxNumResults?: number;
|
|
204
|
+
ranking?: {
|
|
205
|
+
ranker?: 'auto' | 'default-2024-08-21';
|
|
206
|
+
};
|
|
207
|
+
filters?: {
|
|
208
|
+
key: string;
|
|
209
|
+
type: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
210
|
+
value: string | number | boolean;
|
|
211
|
+
} | {
|
|
212
|
+
type: 'and' | 'or';
|
|
213
|
+
filters: any[];
|
|
214
|
+
};
|
|
215
|
+
}): {
|
|
216
|
+
type: "provider-defined";
|
|
217
|
+
id: "openai.file_search";
|
|
218
|
+
name: "file_search";
|
|
219
|
+
args: {
|
|
220
|
+
vectorStoreIds?: string[];
|
|
221
|
+
maxNumResults?: number;
|
|
222
|
+
ranking?: {
|
|
223
|
+
ranker?: "auto" | "default-2024-08-21";
|
|
224
|
+
};
|
|
225
|
+
filters?: {
|
|
226
|
+
key: string;
|
|
227
|
+
type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
228
|
+
value: string | number | boolean;
|
|
229
|
+
} | {
|
|
230
|
+
type: "and" | "or";
|
|
231
|
+
filters: any[];
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
declare function webSearch(args?: {
|
|
237
|
+
filters?: {
|
|
238
|
+
allowedDomains?: string[];
|
|
239
|
+
};
|
|
188
240
|
searchContextSize?: 'low' | 'medium' | 'high';
|
|
189
241
|
userLocation?: {
|
|
190
|
-
type
|
|
242
|
+
type: 'approximate';
|
|
243
|
+
country?: string;
|
|
191
244
|
city?: string;
|
|
192
245
|
region?: string;
|
|
193
|
-
country?: string;
|
|
194
246
|
timezone?: string;
|
|
195
247
|
};
|
|
196
248
|
}): {
|
|
197
|
-
type:
|
|
198
|
-
id:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
type: "file" | "auto" | "code_interpreter";
|
|
213
|
-
files: string[];
|
|
214
|
-
containerId: string | null;
|
|
215
|
-
}>]>;
|
|
216
|
-
}, "strip", z.ZodTypeAny, {
|
|
217
|
-
container: string | {
|
|
218
|
-
type: "file" | "auto" | "code_interpreter";
|
|
219
|
-
files: string[];
|
|
220
|
-
containerId?: string | undefined;
|
|
221
|
-
};
|
|
222
|
-
}, {
|
|
223
|
-
container: string | {
|
|
224
|
-
type: "file" | "auto" | "code_interpreter";
|
|
225
|
-
files: string[];
|
|
226
|
-
containerId: string | null;
|
|
249
|
+
type: "provider-defined";
|
|
250
|
+
id: "openai.web_search";
|
|
251
|
+
name: "web_search";
|
|
252
|
+
args: {
|
|
253
|
+
filters?: {
|
|
254
|
+
allowedDomains?: string[];
|
|
255
|
+
};
|
|
256
|
+
searchContextSize?: "low" | "medium" | "high";
|
|
257
|
+
userLocation?: {
|
|
258
|
+
type: "approximate";
|
|
259
|
+
country?: string;
|
|
260
|
+
city?: string;
|
|
261
|
+
region?: string;
|
|
262
|
+
timezone?: string;
|
|
263
|
+
};
|
|
227
264
|
};
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
declare function webSearchPreview(args?: {
|
|
268
|
+
searchContextSize?: 'low' | 'medium' | 'high';
|
|
269
|
+
userLocation?: {
|
|
270
|
+
type: 'approximate';
|
|
271
|
+
country?: string;
|
|
272
|
+
city?: string;
|
|
273
|
+
region?: string;
|
|
274
|
+
timezone?: string;
|
|
234
275
|
};
|
|
235
276
|
}): {
|
|
236
|
-
type:
|
|
237
|
-
id:
|
|
277
|
+
type: "provider-defined";
|
|
278
|
+
id: "openai.web_search_preview";
|
|
279
|
+
name: "web_search_preview";
|
|
238
280
|
args: {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
type:
|
|
242
|
-
|
|
281
|
+
searchContextSize?: "low" | "medium" | "high";
|
|
282
|
+
userLocation?: {
|
|
283
|
+
type: "approximate";
|
|
284
|
+
country?: string;
|
|
285
|
+
city?: string;
|
|
286
|
+
region?: string;
|
|
287
|
+
timezone?: string;
|
|
243
288
|
};
|
|
244
289
|
};
|
|
245
|
-
parameters: typeof CodeInterpreterParameters;
|
|
246
290
|
};
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
type: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte"]>;
|
|
250
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
251
|
-
}, "strip", z.ZodTypeAny, {
|
|
252
|
-
value: string | number | boolean;
|
|
253
|
-
type: "gte" | "gt" | "lte" | "lt" | "ne" | "eq";
|
|
254
|
-
key: string;
|
|
255
|
-
}, {
|
|
256
|
-
value: string | number | boolean;
|
|
257
|
-
type: "gte" | "gt" | "lte" | "lt" | "ne" | "eq";
|
|
258
|
-
key: string;
|
|
259
|
-
}>, z.ZodType<any, z.ZodTypeDef, any>]>;
|
|
260
|
-
declare const fileSearchArgsSchema: z.ZodObject<{
|
|
291
|
+
|
|
292
|
+
declare const openaiTools: {
|
|
261
293
|
/**
|
|
262
|
-
*
|
|
294
|
+
* The Code Interpreter tool allows models to write and run Python code in a
|
|
295
|
+
* sandboxed environment to solve complex problems in domains like data analysis,
|
|
296
|
+
* coding, and math.
|
|
297
|
+
*
|
|
298
|
+
* @param container - The container to use for the code interpreter.
|
|
299
|
+
*
|
|
300
|
+
* Must have name `code_interpreter`.
|
|
263
301
|
*/
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
*
|
|
302
|
+
codeInterpreter: typeof codeInterpreter;
|
|
303
|
+
/**
|
|
304
|
+
* File search is a tool available in the Responses API. It enables models to
|
|
305
|
+
* retrieve information in a knowledge base of previously uploaded files through
|
|
306
|
+
* semantic and keyword search.
|
|
307
|
+
*
|
|
308
|
+
* Must have name `file_search`.
|
|
309
|
+
*
|
|
310
|
+
* @param vectorStoreIds - The vector store IDs to use for the file search.
|
|
311
|
+
* @param maxNumResults - The maximum number of results to return.
|
|
312
|
+
* @param ranking - The ranking options to use for the file search.
|
|
313
|
+
* @param filters - The filters to use for the file search.
|
|
267
314
|
*/
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
*
|
|
315
|
+
fileSearch: typeof fileSearch;
|
|
316
|
+
/**
|
|
317
|
+
* Web search allows models to access up-to-date information from the internet
|
|
318
|
+
* and provide answers with sourced citations.
|
|
319
|
+
*
|
|
320
|
+
* Must have name `web_search_preview`.
|
|
321
|
+
*
|
|
322
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
323
|
+
* @param userLocation - The user location to use for the web search.
|
|
324
|
+
*
|
|
325
|
+
* @deprecated Use `webSearch` instead.
|
|
271
326
|
*/
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
*
|
|
327
|
+
webSearchPreview: typeof webSearchPreview;
|
|
328
|
+
/**
|
|
329
|
+
* Web search allows models to access up-to-date information from the internet
|
|
330
|
+
* and provide answers with sourced citations.
|
|
331
|
+
*
|
|
332
|
+
* Must have name `web_search`.
|
|
333
|
+
*
|
|
334
|
+
* @param filters - The filters to use for the web search.
|
|
335
|
+
* @param searchContextSize - The search context size to use for the web search.
|
|
336
|
+
* @param userLocation - The user location to use for the web search.
|
|
281
337
|
*/
|
|
282
|
-
|
|
283
|
-
key: z.ZodString;
|
|
284
|
-
type: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte"]>;
|
|
285
|
-
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
286
|
-
}, "strip", z.ZodTypeAny, {
|
|
287
|
-
value: string | number | boolean;
|
|
288
|
-
type: "gte" | "gt" | "lte" | "lt" | "ne" | "eq";
|
|
289
|
-
key: string;
|
|
290
|
-
}, {
|
|
291
|
-
value: string | number | boolean;
|
|
292
|
-
type: "gte" | "gt" | "lte" | "lt" | "ne" | "eq";
|
|
293
|
-
key: string;
|
|
294
|
-
}>, z.ZodType<any, z.ZodTypeDef, any>]>>;
|
|
295
|
-
}, "strip", z.ZodTypeAny, {
|
|
296
|
-
vectorStoreIds?: string[] | undefined;
|
|
297
|
-
maxNumResults?: number | undefined;
|
|
298
|
-
ranking?: {
|
|
299
|
-
ranker?: "auto" | "default-2024-08-21" | undefined;
|
|
300
|
-
} | undefined;
|
|
301
|
-
filters?: any;
|
|
302
|
-
}, {
|
|
303
|
-
vectorStoreIds?: string[] | undefined;
|
|
304
|
-
maxNumResults?: number | undefined;
|
|
305
|
-
ranking?: {
|
|
306
|
-
ranker?: "auto" | "default-2024-08-21" | undefined;
|
|
307
|
-
} | undefined;
|
|
308
|
-
filters?: any;
|
|
309
|
-
}>;
|
|
310
|
-
declare function fileSearchTool({ vectorStoreIds, maxNumResults, ranking, filters, }?: {
|
|
311
|
-
vectorStoreIds?: string[];
|
|
312
|
-
maxNumResults?: number;
|
|
313
|
-
ranking?: {
|
|
314
|
-
ranker?: 'auto' | 'default-2024-08-21';
|
|
315
|
-
};
|
|
316
|
-
filters?: typeof filtersSchema;
|
|
317
|
-
}): {
|
|
318
|
-
type: 'provider-defined';
|
|
319
|
-
id: 'openai.file_search';
|
|
320
|
-
args: z.infer<typeof fileSearchArgsSchema>;
|
|
321
|
-
parameters: {};
|
|
322
|
-
};
|
|
323
|
-
declare const openaiTools: {
|
|
324
|
-
webSearchPreview: typeof webSearchPreviewTool;
|
|
325
|
-
codeInterpreter: typeof codeInterpreterTool;
|
|
326
|
-
fileSearch: typeof fileSearchTool;
|
|
338
|
+
webSearch: typeof webSearch;
|
|
327
339
|
};
|
|
328
340
|
|
|
329
341
|
type OpenAISpeechModelId = 'tts-1' | 'tts-1-hd' | 'gpt-4o-mini-tts' | (string & {});
|