Update tradingagents/llm_clients/ollama_client.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
f3eb1cb143
commit
db23658c8d
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue