mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
Update ollama.py for image handling
Some clients (eg librechat) send images in datauri format, not plain base64. Strip off the prerix when passing images to ollama.
This commit is contained in:
parent
3b6b497672
commit
d5c1ae1cb2
1 changed files with 1 additions and 1 deletions
|
|
@ -157,7 +157,7 @@ def get_ollama_response(
|
|||
if format is not None:
|
||||
data["format"] = format
|
||||
if images is not None:
|
||||
data["images"] = images
|
||||
data["images"] = [image.split(",")[-1] if image.startswith("data:") else image for image in images]
|
||||
|
||||
## LOGGING
|
||||
logging_obj.pre_call(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue