summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorH Lohaus <hlohaus@users.noreply.github.com>2024-04-29 17:48:55 +0200
committerGitHub <noreply@github.com>2024-04-29 17:48:55 +0200
commitffcb0981cc396a8087eb9285f35ed178785d7151 (patch)
tree02997fcf14e35052bfe04911863c95f458d05047 /README.md
parentUpdate README.md (diff)
downloadgpt4free-ffcb0981cc396a8087eb9285f35ed178785d7151.tar
gpt4free-ffcb0981cc396a8087eb9285f35ed178785d7151.tar.gz
gpt4free-ffcb0981cc396a8087eb9285f35ed178785d7151.tar.bz2
gpt4free-ffcb0981cc396a8087eb9285f35ed178785d7151.tar.lz
gpt4free-ffcb0981cc396a8087eb9285f35ed178785d7151.tar.xz
gpt4free-ffcb0981cc396a8087eb9285f35ed178785d7151.tar.zst
gpt4free-ffcb0981cc396a8087eb9285f35ed178785d7151.zip
Diffstat (limited to 'README.md')
-rw-r--r--README.md13
1 files changed, 5 insertions, 8 deletions
diff --git a/README.md b/README.md
index 14da463f..d44a84a4 100644
--- a/README.md
+++ b/README.md
@@ -418,17 +418,14 @@ While we wait for gpt-5, here is a list of new models that are at least better t
| You.com | `g4f.Provider.You` | dall-e-3| ✔️ | [you.com](https://you.com) |
```python
+import requests
from g4f.client import Client
-from g4f.Provider.GeminiPro import GeminiPro
-client = Client(
- api_key="...",
- provider=GeminiPro
-)
-image = requests.get("https://example.jpg", stream=True).raw
+client = Client()
+image = requests.get("https://change_me.jpg", stream=True).raw
response = client.chat.completions.create(
- model="gemini-pro-vision",
- messages=[{"role": "user", "content": "What are on this image?"}],
+ "",
+ messages=[{"role": "user", "content": "what is in this picture?"}],
image=image
)
print(response.choices[0].message.content)