Skip to content

Commit

Permalink
Merge pull request #1268 from usamimeri/image_url_debug
Browse files Browse the repository at this point in the history
fix openai image schema bug
  • Loading branch information
better629 authored May 13, 2024
2 parents f201b2f + 82b4be5 commit da0e47b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metagpt/provider/base_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _user_msg_with_imgs(self, msg: str, images: Optional[Union[str, list[str]]])
# image url or image base64
url = image if image.startswith("http") else f"data:image/jpeg;base64,{image}"
# it can with multiple-image inputs
content.append({"type": "image_url", "image_url": url})
content.append({"type": "image_url", "image_url": {"url": url}})
return {"role": "user", "content": content}

def _assistant_msg(self, msg: str) -> dict[str, str]:
Expand Down

0 comments on commit da0e47b

Please sign in to comment.