mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-11-26 09:57:24 +03:00
Update README.md
This commit is contained in:
parent
ddc65fc918
commit
bfce3af7a5
@ -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)
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user