/api/v2/filter/chunks
  • 03 Oct 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

/api/v2/filter/chunks

  • Dark
    Light
  • PDF

Article summary

Post
/api/v2/filter/chunks

This endpoint can be used to filter document chunks based on a given query.

The query should be a single string.

Chunk ids should be a list of strings. Each string should be the UUID of an existing document chunk.

The model field should be the name of the model to use for filtering.

An optional integer n can be provided, which can be used to return the first n chunks that pass the filter.

Security
API Key
Header parameter nameAuthorization

Token-based authentication with required prefix 'Bearer '. For example: Bearer <api_key>

Body parameters
object

Serializer dedicated to the input request of the filtering endpoint.

query
string Required
chunk_ids
Array of string Required
string
n
integer | null
model
string

Model to use for the filtering, must exist and be configured from the admin. If no model is given, will try to use the "reranker" model.

Default"reranker"
object

Serializer dedicated to the input request of the filtering endpoint.

query
string Required
chunk_ids
Array of string Required
string
n
integer | null
model
string

Model to use for the filtering, must exist and be configured from the admin. If no model is given, will try to use the "reranker" model.

Default"reranker"
object

Serializer dedicated to the input request of the filtering endpoint.

query
string Required
chunk_ids
Array of string Required
string
n
integer | null
model
string

Model to use for the filtering, must exist and be configured from the admin. If no model is given, will try to use the "reranker" model.

Default"reranker"
Responses
200
Expand All
object
query
string
chunks
Array of object (Chunk)
object
uuid
string (uuid)
text
string
metadata
object
property*
filter_score
number (double)

Was this article helpful?