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.0.tar.gz
(8.5 kB
view details)
Built Distribution
geminikit-1.1.0-py3-none-any.whl
(10.5 kB
view details)
File details
Details for the file geminikit-1.1.0.tar.gz
.
File metadata
- Download URL: geminikit-1.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6cf78d6db4bae616334a05a4ec112ebe92785d2b73366380998029e6fc753ea |
|
MD5 | 6e259815d235be1aad10f092e881d26b |
|
BLAKE2b-256 | b0ae0417378d6cae922d3d8894d5cbfb8513e0461e5dae7c2ce35da61073361f |
Provenance
File details
Details for the file geminikit-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: geminikit-1.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35fe95982d561c68d00f978ba0794e1713c892e0b78c3c24be4518fbff9d9eb6 |
|
MD5 | 90dba1dd0397030bc7f9b6369ee2eb21 |
|
BLAKE2b-256 | 8325478aed9dd391c794a1a9249188b02578a8280f527bdd846b007264152647 |