Add a file to a vector store and poll until processing is complete.
(
self,
*,
vector_store_id: str,
file: FileTypes,
attributes: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
poll_interval_ms: int | Omit = omit,
chunking_strategy: FileChunkingStrategyParam | Omit = omit,
)
| 414 | return self.create(vector_store_id=vector_store_id, file_id=file_obj.id, chunking_strategy=chunking_strategy) |
| 415 | |
| 416 | def upload_and_poll( |
| 417 | self, |
| 418 | *, |
| 419 | vector_store_id: str, |
| 420 | file: FileTypes, |
| 421 | attributes: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit, |
| 422 | poll_interval_ms: int | Omit = omit, |
| 423 | chunking_strategy: FileChunkingStrategyParam | Omit = omit, |
| 424 | ) -> VectorStoreFile: |
| 425 | """Add a file to a vector store and poll until processing is complete.""" |
| 426 | file_obj = self._client.files.create(file=file, purpose="assistants") |
| 427 | return self.create_and_poll( |
| 428 | vector_store_id=vector_store_id, |
| 429 | file_id=file_obj.id, |
| 430 | chunking_strategy=chunking_strategy, |
| 431 | poll_interval_ms=poll_interval_ms, |
| 432 | attributes=attributes, |
| 433 | ) |
| 434 | |
| 435 | def content( |
| 436 | self, |
nothing calls this directly
no test coverage detected