I use gpt-4-vision and i get error 400:
My code:
response = client.chat.completions.create(
model="gpt-4-vision-preview",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Hello! What do you see?"},
{"type": "image_url", "image_url": "url..."},
],
}
],
stream=False,
)
Error:
openai.BadRequestError: Error code: 400 - {‘error’: {‘message’: ‘[\n {\n “code”: “invalid_type”,\n “expected”: “string”,\n “received”: “array”,\n “path”: [\n “messages”,\n 1,\n “content”\n ],\n “message”: “Expected string, received array”\n }\n]’, ‘type’: ‘error’, ‘param’: None, ‘code’: None}}