@@ -10,6 +10,7 @@ import * as Shared from '../../shared';
10
10
import * as AssistantsAPI from '../assistants' ;
11
11
import * as ChatAPI from '../../chat/chat' ;
12
12
import * as MessagesAPI from './messages' ;
13
+ import * as VectorStoresAPI from '../vector-stores/vector-stores' ;
13
14
import * as RunsAPI from './runs/runs' ;
14
15
import { Stream } from '../../../streaming' ;
15
16
@@ -379,9 +380,9 @@ export namespace ThreadCreateParams {
379
380
export interface VectorStore {
380
381
/**
381
382
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
382
- * strategy.
383
+ * strategy. Only applicable if `file_ids` is non-empty.
383
384
*/
384
- chunking_strategy ?: VectorStore . Auto | VectorStore . Static ;
385
+ chunking_strategy ?: VectorStoresAPI . FileChunkingStrategyParam ;
385
386
386
387
/**
387
388
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
@@ -398,45 +399,6 @@ export namespace ThreadCreateParams {
398
399
*/
399
400
metadata ?: unknown ;
400
401
}
401
-
402
- export namespace VectorStore {
403
- /**
404
- * The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
405
- * `800` and `chunk_overlap_tokens` of `400`.
406
- */
407
- export interface Auto {
408
- /**
409
- * Always `auto`.
410
- */
411
- type : 'auto' ;
412
- }
413
-
414
- export interface Static {
415
- static : Static . Static ;
416
-
417
- /**
418
- * Always `static`.
419
- */
420
- type : 'static' ;
421
- }
422
-
423
- export namespace Static {
424
- export interface Static {
425
- /**
426
- * The number of tokens that overlap between chunks. The default value is `400`.
427
- *
428
- * Note that the overlap must not exceed half of `max_chunk_size_tokens`.
429
- */
430
- chunk_overlap_tokens : number ;
431
-
432
- /**
433
- * The maximum number of tokens in each chunk. The default value is `800`. The
434
- * minimum value is `100` and the maximum value is `4096`.
435
- */
436
- max_chunk_size_tokens : number ;
437
- }
438
- }
439
- }
440
402
}
441
403
}
442
404
}
@@ -765,9 +727,9 @@ export namespace ThreadCreateAndRunParams {
765
727
export interface VectorStore {
766
728
/**
767
729
* The chunking strategy used to chunk the file(s). If not set, will use the `auto`
768
- * strategy.
730
+ * strategy. Only applicable if `file_ids` is non-empty.
769
731
*/
770
- chunking_strategy ?: VectorStore . Auto | VectorStore . Static ;
732
+ chunking_strategy ?: VectorStoresAPI . FileChunkingStrategyParam ;
771
733
772
734
/**
773
735
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
@@ -784,45 +746,6 @@ export namespace ThreadCreateAndRunParams {
784
746
*/
785
747
metadata ?: unknown ;
786
748
}
787
-
788
- export namespace VectorStore {
789
- /**
790
- * The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
791
- * `800` and `chunk_overlap_tokens` of `400`.
792
- */
793
- export interface Auto {
794
- /**
795
- * Always `auto`.
796
- */
797
- type : 'auto' ;
798
- }
799
-
800
- export interface Static {
801
- static : Static . Static ;
802
-
803
- /**
804
- * Always `static`.
805
- */
806
- type : 'static' ;
807
- }
808
-
809
- export namespace Static {
810
- export interface Static {
811
- /**
812
- * The number of tokens that overlap between chunks. The default value is `400`.
813
- *
814
- * Note that the overlap must not exceed half of `max_chunk_size_tokens`.
815
- */
816
- chunk_overlap_tokens : number ;
817
-
818
- /**
819
- * The maximum number of tokens in each chunk. The default value is `800`. The
820
- * minimum value is `100` and the maximum value is `4096`.
821
- */
822
- max_chunk_size_tokens : number ;
823
- }
824
- }
825
- }
826
749
}
827
750
}
828
751
}
0 commit comments