@@ -304,11 +304,14 @@ def create_and_poll(
304
304
file_id : str ,
305
305
* ,
306
306
vector_store_id : str ,
307
+ attributes : Optional [Dict [str , Union [str , float , bool ]]] | NotGiven = NOT_GIVEN ,
307
308
poll_interval_ms : int | NotGiven = NOT_GIVEN ,
308
309
chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
309
310
) -> VectorStoreFile :
310
311
"""Attach a file to the given vector store and wait for it to be processed."""
311
- self .create (vector_store_id = vector_store_id , file_id = file_id , chunking_strategy = chunking_strategy )
312
+ self .create (
313
+ vector_store_id = vector_store_id , file_id = file_id , chunking_strategy = chunking_strategy , attributes = attributes
314
+ )
312
315
313
316
return self .poll (
314
317
file_id ,
@@ -707,11 +710,14 @@ async def create_and_poll(
707
710
file_id : str ,
708
711
* ,
709
712
vector_store_id : str ,
713
+ attributes : Optional [Dict [str , Union [str , float , bool ]]] | NotGiven = NOT_GIVEN ,
710
714
poll_interval_ms : int | NotGiven = NOT_GIVEN ,
711
715
chunking_strategy : FileChunkingStrategyParam | NotGiven = NOT_GIVEN ,
712
716
) -> VectorStoreFile :
713
717
"""Attach a file to the given vector store and wait for it to be processed."""
714
- await self .create (vector_store_id = vector_store_id , file_id = file_id , chunking_strategy = chunking_strategy )
718
+ await self .create (
719
+ vector_store_id = vector_store_id , file_id = file_id , chunking_strategy = chunking_strategy , attributes = attributes
720
+ )
715
721
716
722
return await self .poll (
717
723
file_id ,
0 commit comments