Retrieve vector store file content
vector_stores.files.content(strfile_id , FileContentParams**kwargs ) -> SyncPage[FileContentResponse]
GET
/vector_stores/{vector_store_id}/files/{file_id}/contentRetrieve the parsed contents of a vector store file.
Retrieve vector store file content
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
)
page = client.vector_stores.files.content(
file_id="file-abc123",
vector_store_id="vs_abc123",
)
page = page.data[0]
print(page.text)Response example
{
"object": "vector_store.file_content.page",
"data": [
{"type": "text", "text": "file content"}
],
"has_more": false,
"next_page": null
}
Returns Examples
Response example
{
"object": "vector_store.file_content.page",
"data": [
{"type": "text", "text": "file content"}
],
"has_more": false,
"next_page": null
}