Update README.md

This commit is contained in:
H Lohaus 2024-04-28 22:58:27 +02:00 committed by GitHub
parent ddc65fc918
commit bfce3af7a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -425,10 +425,11 @@ client = Client(
api_key="...", api_key="...",
provider=GeminiPro provider=GeminiPro
) )
image = requests.get("https://example.jpg", stream=True).raw
response = client.chat.completions.create( response = client.chat.completions.create(
model="gemini-pro-vision", model="gemini-pro-vision",
messages=[{"role": "user", "content": "What are on this image?"}], messages=[{"role": "user", "content": "What are on this image?"}],
image=open("docs/waterfall.jpeg", "rb") image=image
) )
print(response.choices[0].message.content) print(response.choices[0].message.content)
``` ```