feat: arena models

This commit is contained in:
Timothy J. Baek committed 2024-10-22 03:16:48 -07:00
1 parent ee16177924
commit 9f285fb2fb
29 files changed
+974 -43

No files matched your search

+3
View File
@@ -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)