Spaces:
Sleeping
Sleeping
| from llama_index.postprocessor.cohere_rerank import CohereRerank | |
| def reranker(cohere_key): | |
| # Define the Cohere Reranking object to return only the first two highest ranking chunks. | |
| cohere_rerank3 = CohereRerank(top_n=2, api_key=cohere_key,model = 'rerank-english-v3.0') | |
| return cohere_rerank3 | |