From ffcb0981cc396a8087eb9285f35ed178785d7151 Mon Sep 17 00:00:00 2001 From: H Lohaus Date: Mon, 29 Apr 2024 17:48:55 +0200 Subject: Update README.md --- README.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'README.md') 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) -- cgit v1.2.3