Attach a file to the given vector store and wait for it to be processed.
(
self,
file_id: str,
*,
vector_store_id: str,
attributes: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit,
poll_interval_ms: int | Omit = omit,
chunking_strategy: FileChunkingStrategyParam | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
)
| 325 | ) |
| 326 | |
| 327 | def create_and_poll( |
| 328 | self, |
| 329 | file_id: str, |
| 330 | *, |
| 331 | vector_store_id: str, |
| 332 | attributes: Optional[Dict[str, Union[str, float, bool]]] | Omit = omit, |
| 333 | poll_interval_ms: int | Omit = omit, |
| 334 | chunking_strategy: FileChunkingStrategyParam | Omit = omit, |
| 335 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 336 | # The extra values given here take precedence over values defined on the client or passed to this method. |
| 337 | extra_headers: Headers | None = None, |
| 338 | extra_query: Query | None = None, |
| 339 | extra_body: Body | None = None, |
| 340 | timeout: float | httpx.Timeout | None | NotGiven = not_given, |
| 341 | ) -> VectorStoreFile: |
| 342 | """Attach a file to the given vector store and wait for it to be processed.""" |
| 343 | self.create( |
| 344 | vector_store_id=vector_store_id, |
| 345 | file_id=file_id, |
| 346 | chunking_strategy=chunking_strategy, |
| 347 | attributes=attributes, |
| 348 | extra_headers=extra_headers, |
| 349 | extra_query=extra_query, |
| 350 | extra_body=extra_body, |
| 351 | timeout=timeout, |
| 352 | ) |
| 353 | |
| 354 | return self.poll( |
| 355 | file_id, |
| 356 | vector_store_id=vector_store_id, |
| 357 | poll_interval_ms=poll_interval_ms, |
| 358 | ) |
| 359 | |
| 360 | def poll( |
| 361 | self, |
no test coverage detected