Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: CoHereRerank not respecting base_url when provided (#5784)

Edouard Hurb29539b4424b
diff --git a/rag/llm/rerank_model.py b/rag/llm/rerank_model.py
index 89cf126754..a5e40efaa0 100644
--- a/rag/llm/rerank_model.py
+++ b/rag/llm/rerank_model.py
@@ -381,7 +381,7 @@ class CoHereRerank(Base):
def __init__(self, key, model_name, base_url=None):
from cohere import Client
- self.client = Client(api_key=key)
+ self.client = Client(api_key=key, base_url=base_url)
self.model_name = model_name
def similarity(self, query: str, texts: list):