From db23658c8de8f12a3b44955de4b637b2f5bb6a63 Mon Sep 17 00:00:00 2001 From: mohammed bensassi Date: Sun, 8 Mar 2026 14:07:32 +0100 Subject: [PATCH] Update tradingagents/llm_clients/ollama_client.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- tradingagents/llm_clients/ollama_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tradingagents/llm_clients/ollama_client.py b/tradingagents/llm_clients/ollama_client.py index 1fcbd290..56021335 100644 --- a/tradingagents/llm_clients/ollama_client.py +++ b/tradingagents/llm_clients/ollama_client.py @@ -14,8 +14,9 @@ class OllamaClient(BaseLLMClient): def _normalize_base_url(self, url: str) -> str: # ChatOllama expects the root URL, not a /v1 suffix. - if url.endswith("/v1/"): - return url[:-4] + if not url: + return url + url = url.rstrip("/") if url.endswith("/v1"): return url[:-3] return url