Documents
Get Document Answer
Answer a question based on the documents matching the provided metadata filter.
The metadata_filter
parameter supports MongoDB-like query syntax with operators:
- Comparison:
$eq, $ne, $gt, $lt, $gte, $lte, $in, $nin
- Array:
$contains, $containsAny, $notContains, $size
- Logical:
$and, $or, $not
- Type:
$type
- Regex:
$regex, $iregex
Example Metadata Filter
json { "$and": [ { "category": "finance" }, { "tags": { "$contains": ["important"] } }, { "$or": [ { "priority": { "$gt": 2 } }, { "status": "active" } ] } ] }
POST
Headers
Body
application/json
Request model for asking questions about documents.
If True, optimize the metadata filter based on the question
If True, optimize the question by removing parts covered by metadata filter
Optional metadata filters using MongoDB-like query syntax
Format of the answer (MARKDOWN or PLAIN_TEXT)
Available options:
MARKDOWN
, PLAIN_TEXT