OpenAISwift
OpenAISwift copied to clipboard
Is gpt-4-vision-preview model possible?
This model supports image input.
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4-vision-preview",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What’s in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
}
]
}
],
"max_tokens": 300
}'
If you download my fork and branch "dev conf beta" that includes the gpt4-vision-preview model, but you will need to test that the Completions / Messages works and/or update it.
https://github.com/Swift-Almanac/OpenAISwift.git