Closed gustavofuhr closed 1 month ago
This is not a bug, your request isn't correct.
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image in a few words."},
{
"type": "image_url",
"image_url": {
"url": f"data:image/jpeg;base64,{base64_image}",
},
},
],
}
],
max_tokens=100,
)
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
No idea why, but when using the lib to give gtp-4o-mini an image in base64 it's giving me the following error:
It's essentialy the same code provided in https://platform.openai.com/docs/guides/vision/uploading-base-64-encoded-images which works fine for me.
To Reproduce
Just run the code snippet, I guess.
Code snippets
OS
macOS
Python version
Python 3.10.14
Library version
1.40.3