Closed pbarker closed 6 months ago
@pbarker what doc did you look at for this ?
i see this on the openai docs - https://platform.openai.com/docs/guides/vision
@ishaan-jaff
Seeing the code now @pbarker, i believe it should work if you just say
import os
from litellm import completion
os.environ["OPENAI_API_KEY"] = "your-api-key"
# openai call
response = completion(
model = "gpt-4-turbo",
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"
}
}
]
}
],
)
@pbarker can confirm this works for me
Updated docs with this as well - https://github.com/BerriAI/litellm/commit/96e995f53b1aa992e37f72763f44af605e284c76
thank you for the speedy fix!
The Feature
Vision is now supported for gpt-4 turbo, it appears litellm, at least from the docs, does not yet support this
Motivation, pitch
This is an upgrade to the preview model in a number of areas
Twitter / LinkedIn details
https://www.linkedin.com/in/patrickbarkerco/