Skip to content

Commit 3152134

Browse files
committed
fix(vector stores): add missing arguments to files.create_and_poll
1 parent 4f58e18 commit 3152134

File tree

1 file changed

+8
-2
lines changed
  • src/openai/resources/vector_stores

1 file changed

+8
-2
lines changed

src/openai/resources/vector_stores/files.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,14 @@ def create_and_poll(
304304
file_id: str,
305305
*,
306306
vector_store_id: str,
307+
attributes: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
307308
poll_interval_ms: int | NotGiven = NOT_GIVEN,
308309
chunking_strategy: FileChunkingStrategyParam | NotGiven = NOT_GIVEN,
309310
) -> VectorStoreFile:
310311
"""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+
)
312315

313316
return self.poll(
314317
file_id,
@@ -707,11 +710,14 @@ async def create_and_poll(
707710
file_id: str,
708711
*,
709712
vector_store_id: str,
713+
attributes: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
710714
poll_interval_ms: int | NotGiven = NOT_GIVEN,
711715
chunking_strategy: FileChunkingStrategyParam | NotGiven = NOT_GIVEN,
712716
) -> VectorStoreFile:
713717
"""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+
)
715721

716722
return await self.poll(
717723
file_id,

0 commit comments

Comments
 (0)