Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dsdanielpark committed Aug 18, 2023
2 parents f791e8d + 0df86e5 commit 8220513
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions documents/README_DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,30 @@ bard = BardCookies(cookie_dict=cookie_dict)
print(bard.get_answer("こんにちは")['content'])
```
Bard with reusable session which contain mutiple cookie value
```python
import requests
from bardapi import Bard, SESSION_HEADERS
session = requests.Session()
session.cookies.set("__Secure-1PSID", "bard __Secure-1PSID token")
session.cookies.set( "__Secure-1PSIDCC", "bard __Secure-1PSIDCC token")
session.cookies.set("__Secure-1PSIDTS", "bard __Secure-1PSIDTS token")
session.headers = SESSION_HEADERS
bard = Bard(session=session)
bard.get_answer("How is the weather today in seoul?")
```
Multi-cookie Bard with auto cookies from browser
```python
from bardapi import Bard
bard = BardCookies(token_from_browser=True)
bard.get_answer("How is the weather today in seoul?")
```
<br>
### Fix Conversation ID (Fix Context)
Expand Down

0 comments on commit 8220513

Please sign in to comment.