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

Commit

Permalink
fix: add timeout and proxies args to all post
Browse files Browse the repository at this point in the history
  • Loading branch information
dsdanielpark committed Aug 4, 2023
1 parent cae1b22 commit b306fae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bardapi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ def export_conversation(self, bard_answer, title: str = ""):
"https://bard.google.com/_/BardChatUi/data/batchexecute",
params=params,
data=data,
timeout=self.timeout,
proxies=self.proxies,
)
# Post-processing of response
resp_dict = json.loads(resp.content.splitlines()[3])
Expand Down Expand Up @@ -417,6 +419,7 @@ def ask_about_image(self, input_text: str, image: bytes, lang="en-GB") -> dict:
"https://bard.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate",
params=params,
data=data,
timeout=self.timeout,
proxies=self.proxies,
)

Expand Down Expand Up @@ -530,6 +533,8 @@ def export_replit(
"https://bard.google.com/_/BardChatUi/data/batchexecute",
params=params,
data=data,
timeout=self.timeout,
proxies=self.proxies,
)

resp_dict = json.loads(resp.content.splitlines()[3])
Expand Down

0 comments on commit b306fae

Please sign in to comment.