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

Commit

Permalink
fix: nonce val error
Browse files Browse the repository at this point in the history
  • Loading branch information
dsdanielpark committed Apr 4, 2024
1 parent b3bdad7 commit bc946a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gemini/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def _set_sid_and_nonce(self):
Retrieves the session ID (SID) and a SNlM0e nonce value from the application page.
"""
try:
response = requests.get(f"{URLs.BASE_URL.value}/app")
response = requests.get(f"{URLs.BASE_URL.value}/app", cookies=self.cookies)
print(response)
response.raise_for_status()

sid_match = re.search(r'"FdrFJe":"([\d-]+)"', response.text)
Expand Down Expand Up @@ -208,7 +209,7 @@ def _construct_payload(
image
and [
prompt,
0,
int(os.getenv("GEMINI_ULTRA" or 0)),
None,
[[[upload_image(image), 1]]],
]
Expand Down

0 comments on commit bc946a5

Please sign in to comment.