1818from ...._resource import SyncAPIResource , AsyncAPIResource
1919from ...._response import to_streamed_response_wrapper , async_to_streamed_response_wrapper
2020from ....pagination import SyncCursorPage , AsyncCursorPage
21- from ...._base_client import (
22- AsyncPaginator ,
23- make_request_options ,
24- )
21+ from ....types .beta import FileChunkingStrategyParam
22+ from ...._base_client import AsyncPaginator , make_request_options
2523from ....types .beta .vector_stores import file_list_params , file_create_params
24+ from ....types .beta .file_chunking_strategy_param import FileChunkingStrategyParam
2625from ....types .beta .vector_stores .vector_store_file import VectorStoreFile
2726from ....types .beta .vector_stores .vector_store_file_deleted import VectorStoreFileDeleted
2827
@@ -43,7 +42,7 @@ def create(
4342 vector_store_id : str ,
4443 * ,
4544 file_id : str ,
46- chunking_strategy : file_create_params . ChunkingStrategy | NotGiven = NOT_GIVEN ,
45+ chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
4746 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4847 # The extra values given here take precedence over values defined on the client or passed to this method.
4948 extra_headers : Headers | None = None ,
@@ -62,7 +61,7 @@ def create(
6261 files.
6362
6463 chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto`
65- strategy.
64+ strategy. Only applicable if `file_ids` is non-empty.
6665
6766 extra_headers: Send extra headers
6867
@@ -245,7 +244,7 @@ def create_and_poll(
245244 * ,
246245 vector_store_id : str ,
247246 poll_interval_ms : int | NotGiven = NOT_GIVEN ,
248- chunking_strategy : file_create_params . ChunkingStrategy | NotGiven = NOT_GIVEN ,
247+ chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
249248 ) -> VectorStoreFile :
250249 """Attach a file to the given vector store and wait for it to be processed."""
251250 self .create (vector_store_id = vector_store_id , file_id = file_id , chunking_strategy = chunking_strategy )
@@ -302,7 +301,7 @@ def upload(
302301 * ,
303302 vector_store_id : str ,
304303 file : FileTypes ,
305- chunking_strategy : file_create_params . ChunkingStrategy | NotGiven = NOT_GIVEN ,
304+ chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
306305 ) -> VectorStoreFile :
307306 """Upload a file to the `files` API and then attach it to the given vector store.
308307
@@ -318,7 +317,7 @@ def upload_and_poll(
318317 vector_store_id : str ,
319318 file : FileTypes ,
320319 poll_interval_ms : int | NotGiven = NOT_GIVEN ,
321- chunking_strategy : file_create_params . ChunkingStrategy | NotGiven = NOT_GIVEN ,
320+ chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
322321 ) -> VectorStoreFile :
323322 """Add a file to a vector store and poll until processing is complete."""
324323 file_obj = self ._client .files .create (file = file , purpose = "assistants" )
@@ -344,7 +343,7 @@ async def create(
344343 vector_store_id : str ,
345344 * ,
346345 file_id : str ,
347- chunking_strategy : file_create_params . ChunkingStrategy | NotGiven = NOT_GIVEN ,
346+ chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
348347 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
349348 # The extra values given here take precedence over values defined on the client or passed to this method.
350349 extra_headers : Headers | None = None ,
@@ -363,7 +362,7 @@ async def create(
363362 files.
364363
365364 chunking_strategy: The chunking strategy used to chunk the file(s). If not set, will use the `auto`
366- strategy.
365+ strategy. Only applicable if `file_ids` is non-empty.
367366
368367 extra_headers: Send extra headers
369368
@@ -546,7 +545,7 @@ async def create_and_poll(
546545 * ,
547546 vector_store_id : str ,
548547 poll_interval_ms : int | NotGiven = NOT_GIVEN ,
549- chunking_strategy : file_create_params . ChunkingStrategy | NotGiven = NOT_GIVEN ,
548+ chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
550549 ) -> VectorStoreFile :
551550 """Attach a file to the given vector store and wait for it to be processed."""
552551 await self .create (vector_store_id = vector_store_id , file_id = file_id , chunking_strategy = chunking_strategy )
@@ -603,7 +602,7 @@ async def upload(
603602 * ,
604603 vector_store_id : str ,
605604 file : FileTypes ,
606- chunking_strategy : file_create_params . ChunkingStrategy | NotGiven = NOT_GIVEN ,
605+ chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
607606 ) -> VectorStoreFile :
608607 """Upload a file to the `files` API and then attach it to the given vector store.
609608
@@ -621,7 +620,7 @@ async def upload_and_poll(
621620 vector_store_id : str ,
622621 file : FileTypes ,
623622 poll_interval_ms : int | NotGiven = NOT_GIVEN ,
624- chunking_strategy : file_create_params . ChunkingStrategy | NotGiven = NOT_GIVEN ,
623+ chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
625624 ) -> VectorStoreFile :
626625 """Add a file to a vector store and poll until processing is complete."""
627626 file_obj = await self ._client .files .create (file = file , purpose = "assistants" )
0 commit comments