It works well right now. Anybody experiencing reponses of gpt-4-vision-previewwas truncated to a small number of tokens with no reason and finish details type was ‘max_tokens’ should set ‘max_tokens’ parameter of request to 4096 and it’ll work well.
2 Likes
wclayf
12
Yeah, I noticed without setting ‘max_tokens’ you get super short responses which are basically the first few words of the response truncated mid-sentence. Seems like it might be a bug.
I ended up setting max_tokens to 2000, just as a wild guess, because that works, but that doesn’t seem like it should be required, in order to get reasonable results, but it is, which is why I call it a bug.
I had never set max_tokens before on gpt-4, etc., but the vision model seems to need it for some reason, to not come back with the crazy short answers.
1 Like
bersus
13
Following. The same. Only gpt-4-1106-preview is available.
1 Like
Same here no vision available yet, or i am missing something ? Also how can we get full multi modal functionality
Bus
15
no access to gpt-4-vision-preview for me also
Same error, "The model gpt-4-1106-preview does not exist or you do not have access to it. " with a pay account
I still do not have access in the chat, the assistant, or when attempting to access the api in python.
For those who have access to gpt-4-vision-preview, can you advise if it exists in your Playground, or is it only via API?
jakelin
19
It’s working for me when I use “gpt-4-vision-preview” as the model.
AV2
20
Do we have to do this to get instant access? Can someone verify
Initially didn’t work, but then worked for me about 5 mins after topping up my account
Earlier, I didn’t have access to “gpt-4-1106-preview” or “gpt-4-vision-preview” from within Playground. I tried on both the Assistant and Chat modes, but was only getting various gpt-3 options.
So I went to my account, and purchased $5 of credit here:
(which is located in the Settings|Billing menu, where Playground is found)
Now “gpt-4-1106-preview” shows up in the Playground (both Assistant and Chat), HOWEVER, “gpt-4-vision-preview” still does not.
When I try to access “gpt-4-vision-preview” within my Python code, it now works.
1 Like
Cliq
23
My company account experienced issues, while my private account functioned without any problems.
can you help me with that??
If possible share a sample code
I thought I didn’t have it too. It turns out it only shows up in Complete ( Legacy) and not in chat. If you go to the Playground and select Complete you should get the option for “gpt-4-vision-preview” if not you will need to add $5 to your account and wait a bit. I find it really odd that something labelled “legacy” has the latest features available. I hope this helps everyone in this thread.
1 Like
I’ve been looking for it in Chat but finally with your help found it in Complete. Thanks 
1 Like
In the Playground, and while in “Assistants” mode, does anyone see “gpt-4-vision-preview” as an option?
shenzu
28
I see gpt-4-vision-preview in Completion during Playground but trying to run the python chat completion I’m getting the following message:
The model gpt-4-vision-preview does not exist or you do not have access to it.
I topped up $30 as well.
Anyone figure it out?
1 Like
Yes… I am able to use python to run chat.completions using the gpt-4-vision-preview model. Here is the code I’m using and works:
system_prompt = "You are an expert analyzing images."
response = client.chat.completions.create(
model="gpt-4-vision-preview",
messages=[
{
"role": "system",
"content": [
{"type": "text", "text": system_prompt},
],
},
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url":"https://testimages-s3bucket.s3.amazonaws.com/testimage.png",
}
},
],
},
{
"role": "user",
"content": [
{"type": "text", "text": "What do you see in this photo?"},
],
}
],
max_tokens=1000,
)
print(response.choices[0])
1 Like
Also note that… currently, you cannot use gpt-4-vision-preview with the “assistants” API (it is not available in the Playground, and you cannot access it from your Python code)… However, you can access the gpt-4-vision-preview model with the “chat.completions” API (as shown above and below).
And for those who are looking for a base64 example…
def encode_image(image_path):
with open(image_path, “rb”) as image_file:
return base64.b64encode(image_file.read()).decode(‘utf-8’)
encoded_string = encode_image(“testimage.png”)
system_prompt = “You are an expert at analyzing images.”
response = client.chat.completions.create(
model=“gpt-4-vision-preview”,
messages=[
{
“role”: “system”,
“content”: [
{“type”: “text”, “text”: system_prompt},
],
},
{
“role”: “user”,
“content”: [
{
“type”: “image_url”,
“image_url”: {
“url”: f"data:image/jpeg;base64,{encoded_string}"
}
}
],
},
{
“role”: “user”,
“content”: [
{“type”: “text”, “text”: “What do you see in this image?”},
],
}
],
max_tokens=1000,
)
print(response.choices[0])
(Sorry… I can’t seem to get the indentation to work properly on this base64 post)