What am I not understanding here? I thought the GPT-4 with vision (new model) was capable of evaluating an image from a URL. I am building in PHP. Here’s my curl:
$data = [
"model" => "gpt-4-turbo",
"messages" => [
[
"role" => "user",
"content" => "What’s in this image?" . $fileUrl
]
],
"max_tokens" => 3000
];
// Encode the data to JSON
$jsonData = json_encode($data);
// Initialize cURL
$ch = curl_init('https://api.openai.com/v1/chat/completions');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $openai_api_key,
'Content-Type: application/json'
]);
// Execute the request
$response = curl_exec($ch);
curl_close($ch);
$fileUrl equates to a fully qualified URL. The response I get is “I’m sorry for any confusion, but as an AI text model, I can’t directly view images or URLs. However, if you describe the image to me, I could help provide information or answer questions based on your description.”
Am I misunderstanding something here?