All other models send an empty string on the first token that it replies with like this:
GPT-3.5-turbo:
..."choices":[{"delta":{"role":"assistant","content":""}...
but gpt-4-vision-preview is the one model that doesn’t include this:
..."choices":[{"delta":{"role":"assistant"}...
This translates into the resulting SDKs as well; in python, for example, the proper first content token of empty string is parsed properly, however, when using gpt-4-vision-preview, it returns content=None.
Here’s some tests:
GPT-3.5-TURBO:
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "Hello!"
}
],
"stream": true
}'
VISION:
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $" \
-d '{
"model": "gpt-4-vision-preview",
"messages": [
{
"role": "user",
"content": "hello"
}
],
"stream" : true
}'