Closed Undertone0809 closed 6 months ago
@Undertone0809 i think the openai sample code is out of data. Same request fails on openai client as well.
This works for me (on litellm + openai sdk)
from litellm import completion
response = completion(
model="gpt-4o",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Whats in this image?"},
{
"type": "image_url",
"image_url": {
"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"
},
},
],
}
],
)
print(response)
their api reference also says the content is a list of objects -
What happened?
A bug happened when I use gpt-4o analysis image
Code:
Relevant log output