Gemgroq API
A unified API interface that combines both Groq and Google's Gemini AI models into a single, easy-to-use package.
Installation
pip install gemgroq
Setup
After installation, you have two ways to set up your API keys:
-
Interactive Setup (Recommended):
gemgroq --setupThis will prompt you for your API keys and save them securely.
-
Manual Setup:
- Create a
.envfile with your API keys:GROQ_API_KEY=your_groq_api_key GEMINI_API_KEY=your_gemini_api_key
- Or pass them directly in code:
api = GemgroqAPI( groq_api_key="your_groq_api_key", gemini_api_key="your_gemini_api_key" )
- Create a
Get your API keys from:
Usage
from gemgroq import GemgroqAPI
# Initialize the API (will prompt for keys if not set up)
api = GemgroqAPI()
# Get response from either model
response = api.generate(
prompt="Tell me a joke",
model="groq" # or "gemini"
)
print(response)
Features
- Unified interface for both Groq and Gemini models
- Interactive API key setup and secure storage
- Easy switching between models
- Consistent response format
- Error handling and retries
- Environment variable based configuration
CLI Commands
- Set up API keys:
gemgroq --setup - Force update API keys:
gemgroq --setup --force
Supported Models
- Groq: mixtral-8x7b-32768, llama2-70b-4096
- Gemini: gemini-pro
License
MIT
Metadata
Release files for gemgroq 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gemgroq-0.1.2.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gemgroq-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / gemgroq-0.1.2.tar.gz
| Download URL | gemgroq-0.1.2.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbfda72d658ec789ead7ef3d876b42366345fd0819b7c55c688a528d5714cc31
|
|
BLAKE2b-256 checksum How to use checksums |
2446ee10990d0b881d8404ac07272a1bb620e642e817ddf94bf053c1a398083f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|
Release files / gemgroq-0.1.2-py3-none-any.whl
| Download URL | gemgroq-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2409981d20a0f318fa6f16899be6137b8d6d8e298c82f3812cb453af87921a9e
|
|
BLAKE2b-256 checksum How to use checksums |
8cde4753191f597951093c5598736b3df0e0197c7eef9dca1b6e29cd5c844e36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|