A unified API interface for Groq and Google's Gemini AI models
Project description
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 -r requirements.txt
Setup
Create a .env file in your project root with your API keys:
GROQ_API_KEY=your_groq_api_key
GEMINI_API_KEY=your_gemini_api_key
Usage
from gemgroq import GemgroqAPI
# Initialize the API
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
- Easy switching between models
- Consistent response format
- Error handling and retries
- Environment variable based configuration
Supported Models
- Groq: mixtral-8x7b-32768, llama2-70b-4096
- Gemini: gemini-pro
License
MIT
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
gemgroq-0.1.0.tar.gz
(4.1 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.0.tar.gz.
File metadata
- Download URL: gemgroq-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ca1479881727d4b84421ac604399d586c9fb98becd41fb11b750db4f28965d
|
|
| MD5 |
d8711425d08fe62e7f911495ab1c460d
|
|
| BLAKE2b-256 |
47bb6b644d1cf4575c66c3ab39371c525d798effd39257c4de9194857bcebab3
|
File details
Details for the file gemgroq-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gemgroq-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 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 |
c934c5acbfbca7d8fc55ad7c6f5ccf6f91c2e7c27c368033d665123c7f64a496
|
|
| MD5 |
825e3200250e0f6f847f5fc1b6f6d75d
|
|
| BLAKE2b-256 |
7983f77c0f020e0dcdad751cd3f7f51d1117a6a5d038e45c4b1c925d0b3ac1ea
|