We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was trying to use an image input in my chat completion, but it appears its not working at all. My code:
client = OpenAIUnofficial() response = client.chat.completions.create( messages=[{ "role": "user", "content": [ {"type": "text", "text": "What's 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", } }, ], }], model="gpt-4o-mini-2024-07-18" ) print("Response:", response.choices[0].message.content)``` and console return this error: ```File "C:\Users\~\AppData\Local\Programs\Python\Python310\lib\site-packages\openai_unofficial\main.py", line 256, in create response = self.api_handler._make_request( File "C:\Users\~\AppData\Local\Programs\Python\Python310\lib\site-packages\openai_unofficial\main.py", line 65, in _make_request getattr(e.response, 'json', lambda: None)()) File "C:\Users\~\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)```
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I was trying to use an image input in my chat completion, but it appears its not working at all.
My code:
The text was updated successfully, but these errors were encountered: