summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorkqlio67 <kqlio67@users.noreply.github.com>2024-10-15 12:59:47 +0200
committerkqlio67 <kqlio67@users.noreply.github.com>2024-10-15 12:59:47 +0200
commitc5b3de1c3145277eb577549d27d04a572b2eeb97 (patch)
tree8a0d05f8f4f2e2b4731ae858e455e1ac7b8e7a6b /README.md
parentUpdated(docs/client.md) (diff)
downloadgpt4free-c5b3de1c3145277eb577549d27d04a572b2eeb97.tar
gpt4free-c5b3de1c3145277eb577549d27d04a572b2eeb97.tar.gz
gpt4free-c5b3de1c3145277eb577549d27d04a572b2eeb97.tar.bz2
gpt4free-c5b3de1c3145277eb577549d27d04a572b2eeb97.tar.lz
gpt4free-c5b3de1c3145277eb577549d27d04a572b2eeb97.tar.xz
gpt4free-c5b3de1c3145277eb577549d27d04a572b2eeb97.tar.zst
gpt4free-c5b3de1c3145277eb577549d27d04a572b2eeb97.zip
Diffstat (limited to '')
-rw-r--r--README.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/README.md b/README.md
index 1e380675..eee01183 100644
--- a/README.md
+++ b/README.md
@@ -170,8 +170,8 @@ from g4f.client import Client
client = Client()
response = client.chat.completions.create(
model="gpt-3.5-turbo",
- messages=[{"role": "user", "content": "Hello"}],
- ...
+ messages=[{"role": "user", "content": "Say this is a test"}],
+ # Add any other necessary parameters
)
print(response.choices[0].message.content)
```
@@ -187,11 +187,13 @@ from g4f.client import Client
client = Client()
response = client.images.generate(
- model="gemini",
- prompt="a white siamese cat",
- ...
+ model="dall-e-3",
+ prompt="a white siamese cat",
+ # Add any other necessary parameters
)
+
image_url = response.data[0].url
+print(f"Generated image URL: {image_url}")
```
[![Image with cat](/docs/cat.jpeg)](https://github.com/xtekky/gpt4free/blob/main/docs/client.md)