Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hlohaus committed Sep 1, 2023
1 parent 3e6b1d6 commit 9bfcc0c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ If you run the g4l package locally,
cookies from your browsers are readed with `get_cookies`.
Else you have pass them in the parameter `cookies`:
```py
import g4f
from g4f.Provider import (
Bard,
Bing,
Expand All @@ -171,17 +172,17 @@ from g4f.Provider import (
response = g4f.ChatCompletion.create(
model=g4f.models.default,
messages=[{"role": "user", "content": "Hello"}],
provider=g4f.Provider.Name,
provider=Bard,
#cookies=g4f.get_cookies(".google.com"),
cookies={"name": "value", "name1": "value1"},
cookies={"cookie_name": "value", "cookie_name2": "value2"},
auth=True
)
```

##### Async support:

Run providers `async` to improve speed / performance.
The full execution time corresponds to the maximum execution time of a provider.
The full execution time corresponds to the execution time of the slowest provider.

```py
import g4f, asyncio
Expand Down

0 comments on commit 9bfcc0c

Please sign in to comment.