From 82a4232dce80e841f59c06cb291d5fe653b9d1ba Mon Sep 17 00:00:00 2001 From: frob Date: Mon, 8 Apr 2024 03:35:02 +0200 Subject: [PATCH] ollama also accepts PNG --- litellm/llms/ollama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/ollama.py b/litellm/llms/ollama.py index 65a87e514a..400bf480be 100644 --- a/litellm/llms/ollama.py +++ b/litellm/llms/ollama.py @@ -136,7 +136,7 @@ def _convert_image(image): image = image.split(",")[-1] try: image_data = Image.open(io.BytesIO(base64.b64decode(image))) - if image_data.format == "JPEG": + if image_data.format in ["JPEG", "PNG"]: return image except: return orig