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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gemgroq-0.1.2.tar.gz
(5.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gemgroq-0.1.2.tar.gz.
File metadata
- Download URL: gemgroq-0.1.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbfda72d658ec789ead7ef3d876b42366345fd0819b7c55c688a528d5714cc31
|
|
| MD5 |
a88dded707ddc7def6fdc1513d56e42a
|
|
| BLAKE2b-256 |
2446ee10990d0b881d8404ac07272a1bb620e642e817ddf94bf053c1a398083f
|
File details
Details for the file gemgroq-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gemgroq-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2409981d20a0f318fa6f16899be6137b8d6d8e298c82f3812cb453af87921a9e
|
|
| MD5 |
9fc4cd017415de1ac0f2de8fd549d253
|
|
| BLAKE2b-256 |
8cde4753191f597951093c5598736b3df0e0197c7eef9dca1b6e29cd5c844e36
|