Ask a question to get started
Enter to sendā¢Shift+Enter new line
DashScopeRerank()
BaseDocumentCompressor
DashScope client to use for compressing documents.
Model to use for reranking.
Number of documents to return.
DashScope API key. Must be specified directly or via environment variable DASHSCOPE_API_KEY.
Validate that api key and python package exists in environment.
Returns an ordered list of documents ordered by their relevance to the provided query.
Compress documents using DashScope's rerank API.
Document compressor that uses DashScope Rerank API.
DashScope Rerank API