mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
feat: arena models
This commit is contained in:
@@ -116,6 +116,9 @@ def convert_messages_openai_to_ollama(messages: list[dict]) -> list[dict]:
|
||||
elif item.get("type") == "image_url":
|
||||
img_url = item.get("image_url", {}).get("url", "")
|
||||
if img_url:
|
||||
# If the image url starts with data:, it's a base64 image and should be trimmed
|
||||
if img_url.startswith("data:"):
|
||||
img_url = img_url.split(",")[-1]
|
||||
images.append(img_url)
|
||||
|
||||
# Add content text (if any)
|
||||
|
||||
Reference in New Issue
Block a user