Retrieve a chunk's original fragment with optional neighborhood.
Retrieve a chunk's original fragment, with optional neighboring context or the whole file.
When the file was ingested through the doc-chunker, the fragment and its neighborhood are
resolved from the stored document.json. Otherwise (vector created without the doc-chunker),
it falls back to the chunk text already stored on the vector, reconstructed via the vector
database.
Needs user bearer token in authorization header.
AuthorizationBearer <token>file_id*stringThe ID of the file to retrieve
^[0-9a-fA-F]{24}$vector_store_id*stringThe ID of the vector store to use.
^[0-9a-fA-F]{24}$chunk_index*integerIndex of the chunk to retrieve, as assigned during ingestion.
0 <= valuecontext?integerNumber of neighboring fragments/chunks to include on each side.
0 <= value <= 500whole_file?booleanIf true, also return the whole reconstructed file content.
falseOpenAI-Organization?|Organization Id from OpenAi compatible endpoint. Required to organization access or project access (with OpenAI-Project header) when logged as User or Admin User.
OpenAI-Project?|Project Id from OpenAi compatible endpoint. Required to project access for organization api key or User / Admin User access with OpenAI-Organization
Successful Response
application/json- response
file_id*stringA 24-character hexadecimal MongoDB ObjectId string.
^[0-9a-fA-F]{24}$filename*stringchunk_index*integerIndex of the resolved chunk, as assigned during ingestion.
fragment*stringThe chunk's original fragment text.
fragment_source*stringWhether the fragment came from the doc-chunker's document.json or from the chunk's own stored text.
"document_json""chunk_text"neighbors_before?array<string>Text of the neighboring fragments/chunks immediately before the target, if requested.
[]neighbors_after?array<string>Text of the neighboring fragments/chunks immediately after the target, if requested.
[]full_file?|The whole reconstructed file content, if requested.
curl -X GET 'https://deepfellow-server-host/v1/vector_stores/5eb7cf5a86d9755df3a6c593/files/5eb7cf5a86d9755df3a6c593/chunks/0/fragment'{ "file_id": "5eb7cf5a86d9755df3a6c593", "filename": "string", "chunk_index": 0, "fragment": "string", "fragment_source": "document_json", "neighbors_before": [], "neighbors_after": [], "full_file": "string"}We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.