From 790f21459a093dbffcdbbd3552d71b863a196d94 Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Mon, 30 Dec 2024 16:18:20 -0800 Subject: [PATCH] address comments --- llama_stack/providers/utils/inference/prompt_adapter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llama_stack/providers/utils/inference/prompt_adapter.py b/llama_stack/providers/utils/inference/prompt_adapter.py index 79a268d3f..ed0cabe1c 100644 --- a/llama_stack/providers/utils/inference/prompt_adapter.py +++ b/llama_stack/providers/utils/inference/prompt_adapter.py @@ -121,7 +121,9 @@ async def interleaved_content_convert_to_raw( if c.url.uri.startswith("data"): match = re.match(r"data:image/(\w+);base64,(.+)", c.url.uri) if not match: - raise ValueError("Invalid data URL format") + raise ValueError( + f"Invalid data URL format, {c.url.uri[:40]}..." + ) _, image_data = match.groups() data = base64.b64decode(image_data) elif c.url.uri.startswith("file://"):