From 78a8626f35b3f605e39cfde6cbc2e8229247a0c3 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Mon, 30 Jun 2025 20:02:19 +0530 Subject: [PATCH] fix --- llama_stack/providers/remote/inference/ollama/ollama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_stack/providers/remote/inference/ollama/ollama.py b/llama_stack/providers/remote/inference/ollama/ollama.py index f20d82884..c7717479a 100644 --- a/llama_stack/providers/remote/inference/ollama/ollama.py +++ b/llama_stack/providers/remote/inference/ollama/ollama.py @@ -503,7 +503,7 @@ class OllamaInferenceAdapter( async def _convert_message(m: OpenAIMessageParam) -> OpenAIMessageParam: if isinstance(m.content, list): for c in m.content: - if c.type == "image_url" and c.image_url.url: + if c.type == "image_url" and c.image_url and c.image_url.url: localize_result = await localize_image_content(c.image_url.url) if localize_result is None: raise ValueError(f"Failed to localize image content from {c.image_url.url}")