Error on api endpoint examples of chat-image input

There is an error in the example response of the image input scenario under the chat endpoint.

What error are you getting?

From line 210 of openai.yaml

        response: &chat_completion_image_example |
          {
            "id": "chatcmpl-123",
            "object": "chat.completion",
            "created": 1677652288,
            "model": "gpt-3.5-turbo-0613",
            "system_fingerprint": "fp_44709d6fcb",
            "choices": [{
              "index": 0,
              "message": {
                "role": "assistant",
                "content": "\n\nHello there, how may I assist you today?",
              },
              "logprobs": null,
              "finish_reason": "stop"
            }],
            "usage": {
              "prompt_tokens": 9,
              "completion_tokens": 12,
              "total_tokens": 21
            }
          }

Here’s replacement JSON response example to place in the file, with surrounding lines, what is received today (no logprobs, no fingerprint, correct model)

                  });
                  console.log(response.choices[0]);
                }
                main();
            response: &chat_completion_image_example |
              {
                "id": "chatcmpl-123456",
                "object": "chat.completion",
                "created": 1708249531,
                "model": "gpt-4-1106-vision-preview",
                "usage": {
                  "prompt_tokens": 1122,
                  "completion_tokens": 6,
                  "total_tokens": 1128
                },
                "choices": [
                  {
                    "message": {
                      "role": "assistant",
                      "content": "Man singing in music video."
                    },
                    "finish_reason": "stop",
                    "index": 0
                  }
                ]
              }
          - title: Streaming
            request:
              curl: |
                curl https://api.openai.com/v1/chat/completions \
                  -H "Content-Type: application/json" \
New 'messages' to reproduce the output shown
[
  {
    "role": "user",
    "content": [
      {
        "type": "text",
        "text": "Under six words, what’s this image?"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "https://i.imgur.com/oeYzasc.jpeg"
        }
      }
    ]
  }
]
1 Like

Yes, that is the correct response I received. I meant to point out that the example response is not the right one.
Thank you for providing details!