mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
ollama also accepts PNG
This commit is contained in:
parent
59ed4fb51e
commit
82a4232dce
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ def _convert_image(image):
|
||||||
image = image.split(",")[-1]
|
image = image.split(",")[-1]
|
||||||
try:
|
try:
|
||||||
image_data = Image.open(io.BytesIO(base64.b64decode(image)))
|
image_data = Image.open(io.BytesIO(base64.b64decode(image)))
|
||||||
if image_data.format == "JPEG":
|
if image_data.format in ["JPEG", "PNG"]:
|
||||||
return image
|
return image
|
||||||
except:
|
except:
|
||||||
return orig
|
return orig
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue