Optionalfields: CohereRerankArgsCompress documents using Cohere's rerank API.
A sequence of documents to compress.
The query to use for compressing the documents.
A sequence of compressed documents.
Returns an ordered list of documents ordered by their relevance to the provided query.
A list of documents as strings, DocumentInterfaces or objects with a pageContent key.
The query to use for reranking the documents.
Optionaloptions: { OptionalmaxThe maximum number of chunks per document.
Optionalmodel?: stringThe name of the model to use.
OptionaltopN?: numberHow many documents to return.
An ordered list of documents with relevance scores.
Document compressor that uses
Cohere Rerank API.