Skip to content

Commit

Permalink
🐛 Bug: Fix the bug where the OpenRouter channel cannot use images.
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Dec 18, 2024
1 parent d6eb53b commit 22a17e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ async def get_openrouter_payload(request, engine, provider):
if item["type"] == "text":
messages.append({"role": msg.role, "content": item["text"]})
elif item["type"] == "image_url":
messages.append({"role": msg.role, "content": item["url"]})
messages.append({"role": msg.role, "content": [await get_image_message(item["image_url"]["url"], engine)]})
else:
messages.append({"role": msg.role, "content": content})

Expand Down

0 comments on commit 22a17e1

Please sign in to comment.