feat: arena models
This commit is contained in:
1 parent
ee16177924
commit
9f285fb2fb
29 files changed
+974
-43
No files matched your search
@@ -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