Retrieve Chunks
POST/api/chunks/retrieve
Retrieve chunks based on a given query.
Request
- application/json
Body
required
collection Collectionrequired
query Queryrequired
n N
Default value: 10
include_text_chunks Include Text Chunks
Default value: true
include_image_chunks Include Image Chunks
Default value: true
include_summary Include Summary
Default value: false
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
- MOD1
Array [
- MOD1
- MOD1
]
Array [
- MOD1
- MOD1
- MOD1
- MOD1
]
summary
object
required
anyOf
string
text_results
object[]
required
chunk_id Chunk Idrequired
document_id Document Idrequired
score Scorerequired
text Textrequired
raw Rawrequired
start_char_idx
object
Start char index of the chunk.
anyOf
integer
end_char_idx
object
End char index of the chunk.
anyOf
integer
image_results
object[]
required
chunk_id Chunk Idrequired
document_id Document Idrequired
score Scorerequired
image
object
required
Image of the node.
anyOf
string
image_mimetype
object
required
Mimetype of the image.
anyOf
string
image_path
object
required
Path of the image.
anyOf
string
image_url
object
required
URL of the image.
anyOf
string
{
"summary": "string",
"text_results": [
{
"chunk_id": 0,
"document_id": 0,
"score": 0,
"text": "string",
"raw": true,
"start_char_idx": 0,
"end_char_idx": 0
}
],
"image_results": [
{
"chunk_id": 0,
"document_id": 0,
"score": 0,
"image": "string",
"image_mimetype": "string",
"image_path": "string",
"image_url": "string"
}
]
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
msg Messagerequired
type Error Typerequired
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
Loading...