Optional
fields: 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.
Optional
options: { Optional
maxThe maximum number of chunks per document.
Optional
model?: stringThe name of the model to use.
Optional
topN?: numberHow many documents to return.
An ordered list of documents with relevance scores.
Generated using TypeDoc
Document compressor that uses
Cohere Rerank API
.