Ask a question to get started
Enter to sendā¢Shift+Enter new line
CohereRerank()
BaseDocumentCompressor
Cohere client to use for compressing documents.
Number of documents to return.
Model to use for reranking. Mandatory to specify the model name.
Cohere API key. Must be specified directly or via environment variable COHERE_API_KEY.
COHERE_API_KEY
Override the default Cohere API URL.
Identifier for the application making the request.
Validate that api key and python package exists in environment.
Validate that model is specified.
Returns an ordered list of documents ordered by their relevance to the provided query.
Compress documents using Cohere's rerank API.
Document compressor that uses Cohere Rerank API.
Cohere Rerank API