openai 4.47.2 → 4.48.1
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/CHANGELOG.md +29 -0
- package/README.md +10 -3
- package/index.d.ts.map +1 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/index.mjs +0 -1
- package/index.mjs.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/lib/AbstractChatCompletionRunner.js +6 -1
- package/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/lib/AbstractChatCompletionRunner.mjs +6 -1
- package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/batches.d.ts +4 -2
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js +3 -1
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs +3 -1
- package/resources/batches.mjs.map +1 -1
- package/resources/beta/assistants.d.ts +87 -2
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/assistants.js.map +1 -1
- package/resources/beta/assistants.mjs.map +1 -1
- package/resources/beta/threads/threads.d.ts +78 -0
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/beta/vector-stores/file-batches.d.ts +39 -0
- package/resources/beta/vector-stores/file-batches.d.ts.map +1 -1
- package/resources/beta/vector-stores/file-batches.js.map +1 -1
- package/resources/beta/vector-stores/file-batches.mjs.map +1 -1
- package/resources/beta/vector-stores/files.d.ts +76 -0
- package/resources/beta/vector-stores/files.d.ts.map +1 -1
- package/resources/beta/vector-stores/files.js.map +1 -1
- package/resources/beta/vector-stores/files.mjs.map +1 -1
- package/resources/beta/vector-stores/vector-stores.d.ts +37 -0
- package/resources/beta/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/beta/vector-stores/vector-stores.js.map +1 -1
- package/resources/beta/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/chat/completions.d.ts +3 -3
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/files.d.ts +9 -3
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +8 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +8 -2
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +5 -0
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/shared.d.ts +4 -4
- package/src/index.ts +0 -1
- package/src/lib/AbstractChatCompletionRunner.ts +6 -1
- package/src/resources/batches.ts +4 -2
- package/src/resources/beta/assistants.ts +99 -0
- package/src/resources/beta/threads/threads.ts +90 -0
- package/src/resources/beta/vector-stores/file-batches.ts +47 -0
- package/src/resources/beta/vector-stores/files.ts +90 -0
- package/src/resources/beta/vector-stores/vector-stores.ts +43 -0
- package/src/resources/chat/completions.ts +3 -3
- package/src/resources/files.ts +9 -3
- package/src/resources/fine-tuning/jobs/jobs.ts +5 -0
- package/src/resources/shared.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -258,6 +258,7 @@ export type AssistantStreamEvent =
|
|
|
258
258
|
| AssistantStreamEvent.ThreadRunInProgress
|
|
259
259
|
| AssistantStreamEvent.ThreadRunRequiresAction
|
|
260
260
|
| AssistantStreamEvent.ThreadRunCompleted
|
|
261
|
+
| AssistantStreamEvent.ThreadRunIncomplete
|
|
261
262
|
| AssistantStreamEvent.ThreadRunFailed
|
|
262
263
|
| AssistantStreamEvent.ThreadRunCancelling
|
|
263
264
|
| AssistantStreamEvent.ThreadRunCancelled
|
|
@@ -362,6 +363,20 @@ export namespace AssistantStreamEvent {
|
|
|
362
363
|
event: 'thread.run.completed';
|
|
363
364
|
}
|
|
364
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
|
|
368
|
+
* ends with status `incomplete`.
|
|
369
|
+
*/
|
|
370
|
+
export interface ThreadRunIncomplete {
|
|
371
|
+
/**
|
|
372
|
+
* Represents an execution run on a
|
|
373
|
+
* [thread](https://platform.openai.com/docs/api-reference/threads).
|
|
374
|
+
*/
|
|
375
|
+
data: RunsAPI.Run;
|
|
376
|
+
|
|
377
|
+
event: 'thread.run.incomplete';
|
|
378
|
+
}
|
|
379
|
+
|
|
365
380
|
/**
|
|
366
381
|
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
|
|
367
382
|
* fails.
|
|
@@ -618,6 +633,30 @@ export interface FileSearchTool {
|
|
|
618
633
|
* The type of tool being defined: `file_search`
|
|
619
634
|
*/
|
|
620
635
|
type: 'file_search';
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Overrides for the file search tool.
|
|
639
|
+
*/
|
|
640
|
+
file_search?: FileSearchTool.FileSearch;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export namespace FileSearchTool {
|
|
644
|
+
/**
|
|
645
|
+
* Overrides for the file search tool.
|
|
646
|
+
*/
|
|
647
|
+
export interface FileSearch {
|
|
648
|
+
/**
|
|
649
|
+
* The maximum number of results the file search tool should output. The default is
|
|
650
|
+
* 20 for gpt-4\* models and 5 for gpt-3.5-turbo. This number should be between 1
|
|
651
|
+
* and 50 inclusive.
|
|
652
|
+
*
|
|
653
|
+
* Note that the file search tool may output fewer than `max_num_results` results.
|
|
654
|
+
* See the
|
|
655
|
+
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search/number-of-chunks-returned)
|
|
656
|
+
* for more information.
|
|
657
|
+
*/
|
|
658
|
+
max_num_results?: number;
|
|
659
|
+
}
|
|
621
660
|
}
|
|
622
661
|
|
|
623
662
|
export interface FunctionTool {
|
|
@@ -843,6 +882,7 @@ export type RunStreamEvent =
|
|
|
843
882
|
| RunStreamEvent.ThreadRunInProgress
|
|
844
883
|
| RunStreamEvent.ThreadRunRequiresAction
|
|
845
884
|
| RunStreamEvent.ThreadRunCompleted
|
|
885
|
+
| RunStreamEvent.ThreadRunIncomplete
|
|
846
886
|
| RunStreamEvent.ThreadRunFailed
|
|
847
887
|
| RunStreamEvent.ThreadRunCancelling
|
|
848
888
|
| RunStreamEvent.ThreadRunCancelled
|
|
@@ -919,6 +959,20 @@ export namespace RunStreamEvent {
|
|
|
919
959
|
event: 'thread.run.completed';
|
|
920
960
|
}
|
|
921
961
|
|
|
962
|
+
/**
|
|
963
|
+
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
|
|
964
|
+
* ends with status `incomplete`.
|
|
965
|
+
*/
|
|
966
|
+
export interface ThreadRunIncomplete {
|
|
967
|
+
/**
|
|
968
|
+
* Represents an execution run on a
|
|
969
|
+
* [thread](https://platform.openai.com/docs/api-reference/threads).
|
|
970
|
+
*/
|
|
971
|
+
data: RunsAPI.Run;
|
|
972
|
+
|
|
973
|
+
event: 'thread.run.incomplete';
|
|
974
|
+
}
|
|
975
|
+
|
|
922
976
|
/**
|
|
923
977
|
* Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object)
|
|
924
978
|
* fails.
|
|
@@ -1140,6 +1194,12 @@ export namespace AssistantCreateParams {
|
|
|
1140
1194
|
|
|
1141
1195
|
export namespace FileSearch {
|
|
1142
1196
|
export interface VectorStore {
|
|
1197
|
+
/**
|
|
1198
|
+
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
1199
|
+
* strategy.
|
|
1200
|
+
*/
|
|
1201
|
+
chunking_strategy?: VectorStore.Auto | VectorStore.Static;
|
|
1202
|
+
|
|
1143
1203
|
/**
|
|
1144
1204
|
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
|
|
1145
1205
|
* add to the vector store. There can be a maximum of 10000 files in a vector
|
|
@@ -1155,6 +1215,45 @@ export namespace AssistantCreateParams {
|
|
|
1155
1215
|
*/
|
|
1156
1216
|
metadata?: unknown;
|
|
1157
1217
|
}
|
|
1218
|
+
|
|
1219
|
+
export namespace VectorStore {
|
|
1220
|
+
/**
|
|
1221
|
+
* The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
|
|
1222
|
+
* `800` and `chunk_overlap_tokens` of `400`.
|
|
1223
|
+
*/
|
|
1224
|
+
export interface Auto {
|
|
1225
|
+
/**
|
|
1226
|
+
* Always `auto`.
|
|
1227
|
+
*/
|
|
1228
|
+
type: 'auto';
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
export interface Static {
|
|
1232
|
+
static: Static.Static;
|
|
1233
|
+
|
|
1234
|
+
/**
|
|
1235
|
+
* Always `static`.
|
|
1236
|
+
*/
|
|
1237
|
+
type: 'static';
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
export namespace Static {
|
|
1241
|
+
export interface Static {
|
|
1242
|
+
/**
|
|
1243
|
+
* The number of tokens that overlap between chunks. The default value is `400`.
|
|
1244
|
+
*
|
|
1245
|
+
* Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
1246
|
+
*/
|
|
1247
|
+
chunk_overlap_tokens: number;
|
|
1248
|
+
|
|
1249
|
+
/**
|
|
1250
|
+
* The maximum number of tokens in each chunk. The default value is `800`. The
|
|
1251
|
+
* minimum value is `100` and the maximum value is `4096`.
|
|
1252
|
+
*/
|
|
1253
|
+
max_chunk_size_tokens: number;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1158
1257
|
}
|
|
1159
1258
|
}
|
|
1160
1259
|
}
|
|
@@ -369,6 +369,12 @@ export namespace ThreadCreateParams {
|
|
|
369
369
|
|
|
370
370
|
export namespace FileSearch {
|
|
371
371
|
export interface VectorStore {
|
|
372
|
+
/**
|
|
373
|
+
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
374
|
+
* strategy.
|
|
375
|
+
*/
|
|
376
|
+
chunking_strategy?: VectorStore.Auto | VectorStore.Static;
|
|
377
|
+
|
|
372
378
|
/**
|
|
373
379
|
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
|
|
374
380
|
* add to the vector store. There can be a maximum of 10000 files in a vector
|
|
@@ -384,6 +390,45 @@ export namespace ThreadCreateParams {
|
|
|
384
390
|
*/
|
|
385
391
|
metadata?: unknown;
|
|
386
392
|
}
|
|
393
|
+
|
|
394
|
+
export namespace VectorStore {
|
|
395
|
+
/**
|
|
396
|
+
* The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
|
|
397
|
+
* `800` and `chunk_overlap_tokens` of `400`.
|
|
398
|
+
*/
|
|
399
|
+
export interface Auto {
|
|
400
|
+
/**
|
|
401
|
+
* Always `auto`.
|
|
402
|
+
*/
|
|
403
|
+
type: 'auto';
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export interface Static {
|
|
407
|
+
static: Static.Static;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Always `static`.
|
|
411
|
+
*/
|
|
412
|
+
type: 'static';
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export namespace Static {
|
|
416
|
+
export interface Static {
|
|
417
|
+
/**
|
|
418
|
+
* The number of tokens that overlap between chunks. The default value is `400`.
|
|
419
|
+
*
|
|
420
|
+
* Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
421
|
+
*/
|
|
422
|
+
chunk_overlap_tokens: number;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* The maximum number of tokens in each chunk. The default value is `800`. The
|
|
426
|
+
* minimum value is `100` and the maximum value is `4096`.
|
|
427
|
+
*/
|
|
428
|
+
max_chunk_size_tokens: number;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
387
432
|
}
|
|
388
433
|
}
|
|
389
434
|
}
|
|
@@ -711,6 +756,12 @@ export namespace ThreadCreateAndRunParams {
|
|
|
711
756
|
|
|
712
757
|
export namespace FileSearch {
|
|
713
758
|
export interface VectorStore {
|
|
759
|
+
/**
|
|
760
|
+
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
761
|
+
* strategy.
|
|
762
|
+
*/
|
|
763
|
+
chunking_strategy?: VectorStore.Auto | VectorStore.Static;
|
|
764
|
+
|
|
714
765
|
/**
|
|
715
766
|
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
|
|
716
767
|
* add to the vector store. There can be a maximum of 10000 files in a vector
|
|
@@ -726,6 +777,45 @@ export namespace ThreadCreateAndRunParams {
|
|
|
726
777
|
*/
|
|
727
778
|
metadata?: unknown;
|
|
728
779
|
}
|
|
780
|
+
|
|
781
|
+
export namespace VectorStore {
|
|
782
|
+
/**
|
|
783
|
+
* The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
|
|
784
|
+
* `800` and `chunk_overlap_tokens` of `400`.
|
|
785
|
+
*/
|
|
786
|
+
export interface Auto {
|
|
787
|
+
/**
|
|
788
|
+
* Always `auto`.
|
|
789
|
+
*/
|
|
790
|
+
type: 'auto';
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
export interface Static {
|
|
794
|
+
static: Static.Static;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Always `static`.
|
|
798
|
+
*/
|
|
799
|
+
type: 'static';
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
export namespace Static {
|
|
803
|
+
export interface Static {
|
|
804
|
+
/**
|
|
805
|
+
* The number of tokens that overlap between chunks. The default value is `400`.
|
|
806
|
+
*
|
|
807
|
+
* Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
808
|
+
*/
|
|
809
|
+
chunk_overlap_tokens: number;
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* The maximum number of tokens in each chunk. The default value is `800`. The
|
|
813
|
+
* minimum value is `100` and the maximum value is `4096`.
|
|
814
|
+
*/
|
|
815
|
+
max_chunk_size_tokens: number;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
729
819
|
}
|
|
730
820
|
}
|
|
731
821
|
}
|
|
@@ -261,6 +261,53 @@ export interface FileBatchCreateParams {
|
|
|
261
261
|
* files.
|
|
262
262
|
*/
|
|
263
263
|
file_ids: Array<string>;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
267
|
+
* strategy.
|
|
268
|
+
*/
|
|
269
|
+
chunking_strategy?:
|
|
270
|
+
| FileBatchCreateParams.AutoChunkingStrategyRequestParam
|
|
271
|
+
| FileBatchCreateParams.StaticChunkingStrategyRequestParam;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export namespace FileBatchCreateParams {
|
|
275
|
+
/**
|
|
276
|
+
* The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
|
|
277
|
+
* `800` and `chunk_overlap_tokens` of `400`.
|
|
278
|
+
*/
|
|
279
|
+
export interface AutoChunkingStrategyRequestParam {
|
|
280
|
+
/**
|
|
281
|
+
* Always `auto`.
|
|
282
|
+
*/
|
|
283
|
+
type: 'auto';
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export interface StaticChunkingStrategyRequestParam {
|
|
287
|
+
static: StaticChunkingStrategyRequestParam.Static;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Always `static`.
|
|
291
|
+
*/
|
|
292
|
+
type: 'static';
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export namespace StaticChunkingStrategyRequestParam {
|
|
296
|
+
export interface Static {
|
|
297
|
+
/**
|
|
298
|
+
* The number of tokens that overlap between chunks. The default value is `400`.
|
|
299
|
+
*
|
|
300
|
+
* Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
301
|
+
*/
|
|
302
|
+
chunk_overlap_tokens: number;
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* The maximum number of tokens in each chunk. The default value is `800`. The
|
|
306
|
+
* minimum value is `100` and the maximum value is `4096`.
|
|
307
|
+
*/
|
|
308
|
+
max_chunk_size_tokens: number;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
264
311
|
}
|
|
265
312
|
|
|
266
313
|
export interface FileBatchListFilesParams extends CursorPageParams {
|
|
@@ -217,6 +217,11 @@ export interface VectorStoreFile {
|
|
|
217
217
|
* attached to.
|
|
218
218
|
*/
|
|
219
219
|
vector_store_id: string;
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* The strategy used to chunk the file.
|
|
223
|
+
*/
|
|
224
|
+
chunking_strategy?: VectorStoreFile.Static | VectorStoreFile.Other;
|
|
220
225
|
}
|
|
221
226
|
|
|
222
227
|
export namespace VectorStoreFile {
|
|
@@ -235,6 +240,44 @@ export namespace VectorStoreFile {
|
|
|
235
240
|
*/
|
|
236
241
|
message: string;
|
|
237
242
|
}
|
|
243
|
+
|
|
244
|
+
export interface Static {
|
|
245
|
+
static: Static.Static;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Always `static`.
|
|
249
|
+
*/
|
|
250
|
+
type: 'static';
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export namespace Static {
|
|
254
|
+
export interface Static {
|
|
255
|
+
/**
|
|
256
|
+
* The number of tokens that overlap between chunks. The default value is `400`.
|
|
257
|
+
*
|
|
258
|
+
* Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
259
|
+
*/
|
|
260
|
+
chunk_overlap_tokens: number;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The maximum number of tokens in each chunk. The default value is `800`. The
|
|
264
|
+
* minimum value is `100` and the maximum value is `4096`.
|
|
265
|
+
*/
|
|
266
|
+
max_chunk_size_tokens: number;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* This is returned when the chunking strategy is unknown. Typically, this is
|
|
272
|
+
* because the file was indexed before the `chunking_strategy` concept was
|
|
273
|
+
* introduced in the API.
|
|
274
|
+
*/
|
|
275
|
+
export interface Other {
|
|
276
|
+
/**
|
|
277
|
+
* Always `other`.
|
|
278
|
+
*/
|
|
279
|
+
type: 'other';
|
|
280
|
+
}
|
|
238
281
|
}
|
|
239
282
|
|
|
240
283
|
export interface VectorStoreFileDeleted {
|
|
@@ -252,6 +295,53 @@ export interface FileCreateParams {
|
|
|
252
295
|
* files.
|
|
253
296
|
*/
|
|
254
297
|
file_id: string;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
301
|
+
* strategy.
|
|
302
|
+
*/
|
|
303
|
+
chunking_strategy?:
|
|
304
|
+
| FileCreateParams.AutoChunkingStrategyRequestParam
|
|
305
|
+
| FileCreateParams.StaticChunkingStrategyRequestParam;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export namespace FileCreateParams {
|
|
309
|
+
/**
|
|
310
|
+
* The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
|
|
311
|
+
* `800` and `chunk_overlap_tokens` of `400`.
|
|
312
|
+
*/
|
|
313
|
+
export interface AutoChunkingStrategyRequestParam {
|
|
314
|
+
/**
|
|
315
|
+
* Always `auto`.
|
|
316
|
+
*/
|
|
317
|
+
type: 'auto';
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export interface StaticChunkingStrategyRequestParam {
|
|
321
|
+
static: StaticChunkingStrategyRequestParam.Static;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Always `static`.
|
|
325
|
+
*/
|
|
326
|
+
type: 'static';
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export namespace StaticChunkingStrategyRequestParam {
|
|
330
|
+
export interface Static {
|
|
331
|
+
/**
|
|
332
|
+
* The number of tokens that overlap between chunks. The default value is `400`.
|
|
333
|
+
*
|
|
334
|
+
* Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
335
|
+
*/
|
|
336
|
+
chunk_overlap_tokens: number;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The maximum number of tokens in each chunk. The default value is `800`. The
|
|
340
|
+
* minimum value is `100` and the maximum value is `4096`.
|
|
341
|
+
*/
|
|
342
|
+
max_chunk_size_tokens: number;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
255
345
|
}
|
|
256
346
|
|
|
257
347
|
export interface FileListParams extends CursorPageParams {
|
|
@@ -200,6 +200,12 @@ export interface VectorStoreDeleted {
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
export interface VectorStoreCreateParams {
|
|
203
|
+
/**
|
|
204
|
+
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
|
|
205
|
+
* strategy. Only applicable if `file_ids` is non-empty.
|
|
206
|
+
*/
|
|
207
|
+
chunking_strategy?: VectorStoreCreateParams.Auto | VectorStoreCreateParams.Static;
|
|
208
|
+
|
|
203
209
|
/**
|
|
204
210
|
* The expiration policy for a vector store.
|
|
205
211
|
*/
|
|
@@ -227,6 +233,43 @@ export interface VectorStoreCreateParams {
|
|
|
227
233
|
}
|
|
228
234
|
|
|
229
235
|
export namespace VectorStoreCreateParams {
|
|
236
|
+
/**
|
|
237
|
+
* The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
|
|
238
|
+
* `800` and `chunk_overlap_tokens` of `400`.
|
|
239
|
+
*/
|
|
240
|
+
export interface Auto {
|
|
241
|
+
/**
|
|
242
|
+
* Always `auto`.
|
|
243
|
+
*/
|
|
244
|
+
type: 'auto';
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface Static {
|
|
248
|
+
static: Static.Static;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Always `static`.
|
|
252
|
+
*/
|
|
253
|
+
type: 'static';
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export namespace Static {
|
|
257
|
+
export interface Static {
|
|
258
|
+
/**
|
|
259
|
+
* The number of tokens that overlap between chunks. The default value is `400`.
|
|
260
|
+
*
|
|
261
|
+
* Note that the overlap must not exceed half of `max_chunk_size_tokens`.
|
|
262
|
+
*/
|
|
263
|
+
chunk_overlap_tokens: number;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The maximum number of tokens in each chunk. The default value is `800`. The
|
|
267
|
+
* minimum value is `100` and the maximum value is `4096`.
|
|
268
|
+
*/
|
|
269
|
+
max_chunk_size_tokens: number;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
230
273
|
/**
|
|
231
274
|
* The expiration policy for a vector store.
|
|
232
275
|
*/
|
|
@@ -137,7 +137,7 @@ export interface ChatCompletionAssistantMessageParam {
|
|
|
137
137
|
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
|
|
138
138
|
* a function that should be called, as generated by the model.
|
|
139
139
|
*/
|
|
140
|
-
function_call?: ChatCompletionAssistantMessageParam.FunctionCall;
|
|
140
|
+
function_call?: ChatCompletionAssistantMessageParam.FunctionCall | null;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* An optional name for the participant. Provides the model information to
|
|
@@ -885,8 +885,8 @@ export namespace ChatCompletionCreateParams {
|
|
|
885
885
|
|
|
886
886
|
/**
|
|
887
887
|
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
888
|
-
* [guide](https://platform.openai.com/docs/guides/
|
|
889
|
-
*
|
|
888
|
+
* [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
|
|
889
|
+
* and the
|
|
890
890
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
891
891
|
* documentation about the format.
|
|
892
892
|
*
|
package/src/resources/files.ts
CHANGED
|
@@ -21,9 +21,15 @@ export class Files extends APIResource {
|
|
|
21
21
|
* [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) for
|
|
22
22
|
* details.
|
|
23
23
|
*
|
|
24
|
-
* The Fine-tuning API only supports `.jsonl` files.
|
|
24
|
+
* The Fine-tuning API only supports `.jsonl` files. The input also has certain
|
|
25
|
+
* required formats for fine-tuning
|
|
26
|
+
* [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or
|
|
27
|
+
* [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input)
|
|
28
|
+
* models.
|
|
25
29
|
*
|
|
26
|
-
* The Batch API only supports `.jsonl` files up to 100 MB in size.
|
|
30
|
+
* The Batch API only supports `.jsonl` files up to 100 MB in size. The input also
|
|
31
|
+
* has a specific required
|
|
32
|
+
* [format](https://platform.openai.com/docs/api-reference/batch/request-input).
|
|
27
33
|
*
|
|
28
34
|
* Please [contact us](https://help.openai.com/) if you need to increase these
|
|
29
35
|
* storage limits.
|
|
@@ -194,7 +200,7 @@ export interface FileCreateParams {
|
|
|
194
200
|
* [Batch API](https://platform.openai.com/docs/guides/batch), and "fine-tune" for
|
|
195
201
|
* [Fine-tuning](https://platform.openai.com/docs/api-reference/fine-tuning).
|
|
196
202
|
*/
|
|
197
|
-
purpose: 'assistants' | 'batch' | 'fine-tune';
|
|
203
|
+
purpose: 'assistants' | 'batch' | 'fine-tune' | 'vision';
|
|
198
204
|
}
|
|
199
205
|
|
|
200
206
|
export interface FileListParams {
|
|
@@ -312,6 +312,11 @@ export interface JobCreateParams {
|
|
|
312
312
|
* Your dataset must be formatted as a JSONL file. Additionally, you must upload
|
|
313
313
|
* your file with the purpose `fine-tune`.
|
|
314
314
|
*
|
|
315
|
+
* The contents of the file should differ depending on if the model uses the
|
|
316
|
+
* [chat](https://platform.openai.com/docs/api-reference/fine-tuning/chat-input) or
|
|
317
|
+
* [completions](https://platform.openai.com/docs/api-reference/fine-tuning/completions-input)
|
|
318
|
+
* format.
|
|
319
|
+
*
|
|
315
320
|
* See the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning)
|
|
316
321
|
* for more details.
|
|
317
322
|
*/
|
package/src/resources/shared.ts
CHANGED
|
@@ -25,8 +25,8 @@ export interface FunctionDefinition {
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
28
|
-
* [guide](https://platform.openai.com/docs/guides/
|
|
29
|
-
*
|
|
28
|
+
* [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
|
|
29
|
+
* and the
|
|
30
30
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
31
31
|
* documentation about the format.
|
|
32
32
|
*
|
|
@@ -37,8 +37,8 @@ export interface FunctionDefinition {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
40
|
-
* [guide](https://platform.openai.com/docs/guides/
|
|
41
|
-
*
|
|
40
|
+
* [guide](https://platform.openai.com/docs/guides/function-calling) for examples,
|
|
41
|
+
* and the
|
|
42
42
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
43
43
|
* documentation about the format.
|
|
44
44
|
*
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.48.1'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.48.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.48.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|