@@ -10,6 +10,7 @@ import * as Shared from '../../shared';
1010import * as AssistantsAPI from '../assistants' ;
1111import * as ChatAPI from '../../chat/chat' ;
1212import * as MessagesAPI from './messages' ;
13+ import * as VectorStoresAPI from '../vector-stores/vector-stores' ;
1314import * as RunsAPI from './runs/runs' ;
1415import { Stream } from '../../../streaming' ;
1516
@@ -379,9 +380,9 @@ export namespace ThreadCreateParams {
379380 export interface VectorStore {
380381 /**
381382 * 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.
383384 */
384- chunking_strategy ?: VectorStore . Auto | VectorStore . Static ;
385+ chunking_strategy ?: VectorStoresAPI . FileChunkingStrategyParam ;
385386
386387 /**
387388 * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
@@ -398,45 +399,6 @@ export namespace ThreadCreateParams {
398399 */
399400 metadata ?: unknown ;
400401 }
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- }
440402 }
441403 }
442404}
@@ -765,9 +727,9 @@ export namespace ThreadCreateAndRunParams {
765727 export interface VectorStore {
766728 /**
767729 * 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.
769731 */
770- chunking_strategy ?: VectorStore . Auto | VectorStore . Static ;
732+ chunking_strategy ?: VectorStoresAPI . FileChunkingStrategyParam ;
771733
772734 /**
773735 * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
@@ -784,45 +746,6 @@ export namespace ThreadCreateAndRunParams {
784746 */
785747 metadata ?: unknown ;
786748 }
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- }
826749 }
827750 }
828751 }
0 commit comments