-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
NOTE: This is an issue with the _documentation_ of the python library not the *functionality*
It seems like one of the example code snippets is incomplete/incorrect
More specifically, the example states: The Chat Completions API is capable of taking in and processing multiple image inputs in both base64 encoded format or as an image URL.
However, the code itself shows only the image URL reference (twice):
{
"role": "user",
"content": [
{
"type": "text",
"text": "What are in these images? Is there any difference between them?",
},
{
"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",
},
},
{
"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",
},
},
],
}
],```
### To Reproduce
Read the python documentation at: https://platform.openai.com/docs/guides/vision/multiple-image-inputs
### Code snippets
```Python
I suspect the code example should be something like:
=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "What are in these images? Is there any difference between them?",
},
{
"type": "image_url",
"image_url": {
"url": f"data:image/jpeg;base64,{base64_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",
},
},
],
}
],
Note the change of one of the Wikimedia URLS to: `"url": f"data:image/jpeg;base64,{base64_image}"`
OS
Any
Python version
Any
Library version
Any
iambackend
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocumentationImprovements or additions to documentationImprovements or additions to documentation