Rerank documents
Rerank documents theo query. Tương thích với Cohere Rerank API.
Authentication
AuthorizationBearer
API key làm bearer token. Tạo API key tại [Console](https://console.staging.tram.ai.vn/keys).
Request
This endpoint expects an object.
model
Model ID (ví dụ: Cohere Rerank v3.5)
query
Query dùng để rerank documents
documents
Danh sách documents cần rerank (string hoặc object)
top_n
Số documents trả về (mặc định trả tất cả)
rank_fields
Các trường dùng để ranking (khi documents là object)
return_documents
Trả lại nội dung document trong response
max_chunks_per_doc
Số chunks tối đa mỗi document
max_tokens_per_doc
Số tokens tối đa mỗi document
Response
Thành công
id
results
meta
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
