Skip to content

Commit

Permalink
Update - ensure attachment (images) are in a dict with the key 'url'
Browse files Browse the repository at this point in the history
  • Loading branch information
aybruhm committed Nov 29, 2023
1 parent 6c52941 commit 325c608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/vision_gpt_explain_image/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def replace_image_url(
for content in value:
if content["type"] == "image_url":
content["image_url"] = (
image_two
{"url": image_two}
if content["image_url"] == image_one
else image_one
else {"url": image_one}
)
new_content.append(content)
new_message[key] = new_content
Expand Down

0 comments on commit 325c608

Please sign in to comment.