From b1117a8717ba5a20715274ca231a19baa64f3142 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Mon, 16 Jun 2025 13:40:25 +0800 Subject: [PATCH] Fix: base url issue. (#8281) ### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/llm/chat_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py index a7a088077..3e96f75f4 100644 --- a/rag/llm/chat_model.py +++ b/rag/llm/chat_model.py @@ -853,7 +853,7 @@ class OllamaChat(Base): def __init__(self, key, model_name, base_url=None, **kwargs): super().__init__(key, model_name, base_url=base_url, **kwargs) - self.client = Client(host=kwargs["base_url"]) if not key or key == "x" else Client(host=kwargs["base_url"], headers={"Authorization": f"Bearer {key}"}) + self.client = Client(host=base_url) if not key or key == "x" else Client(host=base_url, headers={"Authorization": f"Bearer {key}"}) self.model_name = model_name def _clean_conf(self, gen_conf):