Skip to content

Commit

Permalink
Add image to run function
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Sep 18, 2024
1 parent 31addac commit 31c5dfa
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions cookbook/agents/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,26 @@
debug_mode=True,
)

run1: RunResponse = agent.run(
"What’s in this image?",
# run: RunResponse = agent.run(
# "What’s in this image?",
# images=[
# "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
# ],
# ) # type: ignore
# run: RunResponse = agent.run(
# "What’s in this image?",
# images=[
# {
# "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
# "detail": "high",
# }
# ],
# ) # type: ignore
run: RunResponse = agent.run(
"What are in these images? Is there any difference between them?",
images=[
"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
],
) # type: ignore
pprint(run1.content)
pprint(run.content)

0 comments on commit 31c5dfa

Please sign in to comment.