@@ -9,6 +9,7 @@ import * as Shared from '../../shared';
99import * as AssistantsAPI from '../assistants' ;
1010import * as ChatAPI from '../../chat/chat' ;
1111import * as MessagesAPI from './messages' ;
12+ import * as VectorStoresAPI from '../vector-stores/vector-stores' ;
1213import * as RunsAPI from './runs/runs' ;
1314import { Stream } from '../../../streaming' ;
1415
@@ -355,9 +356,9 @@ export namespace ThreadCreateParams {
355356 export interface VectorStore {
356357 /**
357358 * The chunking strategy used to chunk the file(s). If not set, will use the `auto`
358- * strategy.
359+ * strategy. Only applicable if `file_ids` is non-empty.
359360 */
360- chunking_strategy ?: VectorStore . Auto | VectorStore . Static ;
361+ chunking_strategy ?: VectorStoresAPI . FileChunkingStrategyParam ;
361362
362363 /**
363364 * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
@@ -374,45 +375,6 @@ export namespace ThreadCreateParams {
374375 */
375376 metadata ?: unknown ;
376377 }
377-
378- export namespace VectorStore {
379- /**
380- * The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
381- * `800` and `chunk_overlap_tokens` of `400`.
382- */
383- export interface Auto {
384- /**
385- * Always `auto`.
386- */
387- type : 'auto' ;
388- }
389-
390- export interface Static {
391- static : Static . Static ;
392-
393- /**
394- * Always `static`.
395- */
396- type : 'static' ;
397- }
398-
399- export namespace Static {
400- export interface Static {
401- /**
402- * The number of tokens that overlap between chunks. The default value is `400`.
403- *
404- * Note that the overlap must not exceed half of `max_chunk_size_tokens`.
405- */
406- chunk_overlap_tokens : number ;
407-
408- /**
409- * The maximum number of tokens in each chunk. The default value is `800`. The
410- * minimum value is `100` and the maximum value is `4096`.
411- */
412- max_chunk_size_tokens : number ;
413- }
414- }
415- }
416378 }
417379 }
418380}
@@ -741,9 +703,9 @@ export namespace ThreadCreateAndRunParams {
741703 export interface VectorStore {
742704 /**
743705 * The chunking strategy used to chunk the file(s). If not set, will use the `auto`
744- * strategy.
706+ * strategy. Only applicable if `file_ids` is non-empty.
745707 */
746- chunking_strategy ?: VectorStore . Auto | VectorStore . Static ;
708+ chunking_strategy ?: VectorStoresAPI . FileChunkingStrategyParam ;
747709
748710 /**
749711 * A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
@@ -760,45 +722,6 @@ export namespace ThreadCreateAndRunParams {
760722 */
761723 metadata ?: unknown ;
762724 }
763-
764- export namespace VectorStore {
765- /**
766- * The default strategy. This strategy currently uses a `max_chunk_size_tokens` of
767- * `800` and `chunk_overlap_tokens` of `400`.
768- */
769- export interface Auto {
770- /**
771- * Always `auto`.
772- */
773- type : 'auto' ;
774- }
775-
776- export interface Static {
777- static : Static . Static ;
778-
779- /**
780- * Always `static`.
781- */
782- type : 'static' ;
783- }
784-
785- export namespace Static {
786- export interface Static {
787- /**
788- * The number of tokens that overlap between chunks. The default value is `400`.
789- *
790- * Note that the overlap must not exceed half of `max_chunk_size_tokens`.
791- */
792- chunk_overlap_tokens : number ;
793-
794- /**
795- * The maximum number of tokens in each chunk. The default value is `800`. The
796- * minimum value is `100` and the maximum value is `4096`.
797- */
798- max_chunk_size_tokens : number ;
799- }
800- }
801- }
802725 }
803726 }
804727 }
0 commit comments