mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +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]
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue