mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-23 11:02:40 +03:00
Updated(docs/client.md)
This commit is contained in:
parent
dd17d5aca8
commit
202b0730ff
@ -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"}],
|
||||||
|
Loading…
Reference in New Issue
Block a user