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

Commit

Permalink
feat: add bard async cookies (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsdanielpark committed Jan 19, 2024
1 parent 2a59c86 commit cff766d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion bardapi/core_cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,21 @@ def export_replit(

class BardAsyncCookies(BardAsync):
"""
Bard class for interacting with the Bard API using httpx[http2]
BardAsyncCookies facilitates interaction with the Bard API via httpx[http2],
supporting efficient network use and improved performance with HTTP/2.
It's beneficial for managing cookies, especially for authentication or maintaining sessions.
Example:
from bardapi import ChatBardCookies
# Instantiate ChatBardCookies to manage cookies and authentication automatically.
chat = ChatBardCookies(token_from_browser=True)
chat.start() # Initiates a chat session with automatic cookie handling.
Note:
'httpx[http2]' is required for HTTP/2 support.
'token_from_browser=True' fetches authentication tokens from browser cookies.
"""

def __init__(
Expand Down

0 comments on commit cff766d

Please sign in to comment.