Updated(docs/client.md)

This commit is contained in:
kqlio67 2024-10-15 13:58:09 +03:00
parent dd17d5aca8
commit 202b0730ff

View File

@ -61,8 +61,8 @@ You can use the `ChatCompletions` endpoint to generate text completions as follo
```python ```python
from g4f.client import Client from g4f.client import Client
client = Client()
client = Client()
response = client.chat.completions.create( response = client.chat.completions.create(
model="gpt-3.5-turbo", model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Say this is a test"}], messages=[{"role": "user", "content": "Say this is a test"}],
@ -77,7 +77,6 @@ Also streaming are supported:
from g4f.client import Client from g4f.client import Client
client = Client() client = Client()
stream = client.chat.completions.create( stream = client.chat.completions.create(
model="gpt-4", model="gpt-4",
messages=[{"role": "user", "content": "Say this is a test"}], messages=[{"role": "user", "content": "Say this is a test"}],