From 978517df38ac938c3f9b2b96bf039cd52ed51eaf Mon Sep 17 00:00:00 2001 From: xtat Date: Sat, 19 Jul 2025 20:26:07 +0000 Subject: [PATCH] non-localhost ollama server fix- get ollama host from base_url --- src/dolphin_mcp/providers/ollama.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dolphin_mcp/providers/ollama.py b/src/dolphin_mcp/providers/ollama.py index b89aac1..bf819a7 100644 --- a/src/dolphin_mcp/providers/ollama.py +++ b/src/dolphin_mcp/providers/ollama.py @@ -520,8 +520,8 @@ async def call_ollama_api( # Determine host and construct URL host = DEFAULT_API_HOST - if client and hasattr(client, 'host'): - host = client.host + if client and hasattr(client._client, 'base_url'): + host = client._client.base_url api_url = f"{host}/api/chat" logger.debug(f"Target API URL: {api_url}")