Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions vllm_mlx/models/mllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ def chat(
# OpenAI multimodal format
for item in content:
if isinstance(item, str):
text_prompt = item
text_prompt += item
continue

# Convert Pydantic models to dicts
Expand All @@ -1057,7 +1057,7 @@ def chat(
item_type = item.get("type", "")

if item_type == "text":
text_prompt = item.get("text", "")
text_prompt += item.get("text", "")

elif item_type == "image_url":
img_url = item.get("image_url", {})
Expand Down Expand Up @@ -1185,7 +1185,7 @@ def stream_chat(
# OpenAI multimodal format
for item in content:
if isinstance(item, str):
text_prompt = item
text_prompt += item
continue

# Convert Pydantic models to dicts
Expand All @@ -1198,7 +1198,7 @@ def stream_chat(
item_type = item.get("type", "")

if item_type == "text":
text_prompt = item.get("text", "")
text_prompt += item.get("text", "")

elif item_type == "image_url":
img_url = item.get("image_url", {})
Expand Down