The python package that returns Response of Google Gemini through Cookies.
Project description
GeminiKit
An unofficial Python wrapper, geminikit, has been developed through reverse-engineering. This tool utilizes cookie values to interact with Google Gemini for testing purposes.
Installation
pip install -U geminikit
or
pip install git+https://github.com/rekcah-pavi/geminikit
Log Cookies
video guide
1. Close All Tabs
Ensure all tabs are closed in Google Chrome.
2. Access Network Export
- Open a new tab and navigate to
chrome://net-export/
.
3. Configure Logging Settings
- Check the box labeled
Include cookies and credentials
. - Set the
Maximum log size
to1 MB
. - Click the
Start logging
button.
4. Perform Actions
- Open a new tab and go to gemini.google.com.
- Log in to your Gemini account.
- Send a sample message and wait for Gemini's response.
5. Stop Logging
- Return to the logging tab and click the
Stop logging
button.
6. Retrieve Cookies
- The cookies will be saved in a JSON file.
7. Get cookies from your saved file
from geminikit import get_cookies_from_file
with open("chrome-net-export-log.json",'r') as f:
cookies = get_cookies_from_file(f.read())
print(cookies)
Usage
Setup gemini
from geminikit import Gemini
gemini = Gemini(cookies)
Ask a message
res = gemini.ask("hello")
print(res['text'])
Text to Voice
res = gemini.speech("hello")
with open("a.wav","wb") as f:
f.write(res)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
geminikit-1.1.1.tar.gz
(8.6 kB
view hashes)
Built Distribution
geminikit-1.1.1-py3-none-any.whl
(10.5 kB
view hashes)
Close
Hashes for geminikit-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e41421b43f45a534c8b06e06cc4b70b4ade5cc5b89e220f8c366f6221b6c05ee |
|
MD5 | 4b8127dd065af538f45b25e948263e02 |
|
BLAKE2b-256 | bb52c0bc2788e319f7cf3a9d62a9046674410fcc9c60cbab181af2a98e97c7f3 |