From aba4b96f23ef38ca75195b3b78a88bb92035b4a9 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Mon, 12 Feb 2024 11:41:27 +0100 Subject: Add new Client API with Docs Use object urls for the preview of image uploads. Fix upload images in You provider Fix create image. It's now a single image. Improve system message for create images. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 6734fe02..dc7ef933 100644 --- a/README.md +++ b/README.md @@ -226,6 +226,23 @@ docker-compose down ## 💡 Usage +### New Client with Image Generation +```python +from g4f.client import Client + +client = Client() +response = client.images.generate( + model="gemini", + prompt="a white siamese cat", + ... +) +image_url = response.data[0].url +``` +Result: +[![Image with cat](/docs/cat.jpeg)](/docs/client.md) + +[to the client API](/docs/client.md) + ### The Web UI To start the web interface, type the following codes in the command line. -- cgit v1.2.3 From 151f8b8b0e409b112c806927250d5f578f0f6805 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Mon, 12 Feb 2024 12:08:08 +0100 Subject: Add variant example --- README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index dc7ef933..f7e9f0f7 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,9 @@ docker-compose down ## 💡 Usage ### New Client with Image Generation + +#### not jet released + ```python from g4f.client import Client -- cgit v1.2.3