2525)
2626from ...pagination import SyncOpenAICursorPage , AsyncOpenAICursorPage
2727from ..._base_client import AsyncPaginator , make_request_options
28- from ...types .vector_stores import file_list_params , file_create_params , file_update_params
28+ from ...types .vector_stores import file_list_params , file_create_params , file_update_params , file_content_params
2929from ...types .vector_stores .vector_store_file import VectorStoreFile
3030from ...types .vector_stores .file_delete_response import FileDeleteResponse
3131from ...types .vector_stores .file_content_response import FileContentResponse
@@ -286,6 +286,8 @@ def content(
286286 file_id : str ,
287287 * ,
288288 vector_store_id : str ,
289+ include_embeddings : bool | Omit = omit ,
290+ include_metadata : bool | Omit = omit ,
289291 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
290292 # The extra values given here take precedence over values defined on the client or passed to this method.
291293 extra_headers : Headers | None = None ,
@@ -297,6 +299,10 @@ def content(
297299 Retrieves the contents of a vector store file.
298300
299301 Args:
302+ include_embeddings: Whether to include embedding vectors in the response.
303+
304+ include_metadata: Whether to include chunk metadata in the response.
305+
300306 extra_headers: Send extra headers
301307
302308 extra_query: Add additional query parameters to the request
@@ -312,7 +318,17 @@ def content(
312318 return self ._get (
313319 f"/v1/vector_stores/{ vector_store_id } /files/{ file_id } /content" ,
314320 options = make_request_options (
315- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
321+ extra_headers = extra_headers ,
322+ extra_query = extra_query ,
323+ extra_body = extra_body ,
324+ timeout = timeout ,
325+ query = maybe_transform (
326+ {
327+ "include_embeddings" : include_embeddings ,
328+ "include_metadata" : include_metadata ,
329+ },
330+ file_content_params .FileContentParams ,
331+ ),
316332 ),
317333 cast_to = FileContentResponse ,
318334 )
@@ -571,6 +587,8 @@ async def content(
571587 file_id : str ,
572588 * ,
573589 vector_store_id : str ,
590+ include_embeddings : bool | Omit = omit ,
591+ include_metadata : bool | Omit = omit ,
574592 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
575593 # The extra values given here take precedence over values defined on the client or passed to this method.
576594 extra_headers : Headers | None = None ,
@@ -582,6 +600,10 @@ async def content(
582600 Retrieves the contents of a vector store file.
583601
584602 Args:
603+ include_embeddings: Whether to include embedding vectors in the response.
604+
605+ include_metadata: Whether to include chunk metadata in the response.
606+
585607 extra_headers: Send extra headers
586608
587609 extra_query: Add additional query parameters to the request
@@ -597,7 +619,17 @@ async def content(
597619 return await self ._get (
598620 f"/v1/vector_stores/{ vector_store_id } /files/{ file_id } /content" ,
599621 options = make_request_options (
600- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
622+ extra_headers = extra_headers ,
623+ extra_query = extra_query ,
624+ extra_body = extra_body ,
625+ timeout = timeout ,
626+ query = await async_maybe_transform (
627+ {
628+ "include_embeddings" : include_embeddings ,
629+ "include_metadata" : include_metadata ,
630+ },
631+ file_content_params .FileContentParams ,
632+ ),
601633 ),
602634 cast_to = FileContentResponse ,
603635 )
0 commit comments