Skip to content

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

fix(ollama): preserve native API base URL in OllamaCV (#17013)

iwasakic84713fe3a72
diff --git a/rag/llm/cv_model.py b/rag/llm/cv_model.py
index 83c7845121..4ec3614cf2 100644
--- a/rag/llm/cv_model.py
+++ b/rag/llm/cv_model.py
@@ -781,7 +781,7 @@ class OllamaCV(Base):
def __init__(self, key, model_name, lang="Chinese", **kwargs):
from ollama import Client
- self.base_url = ensure_v1(kwargs["base_url"])
+ self.base_url = kwargs["base_url"].rstrip("/")
self.client = Client(host=self.base_url)
self.model_name = model_name
self.lang = lang