Skip to main content

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:

  1. Interactive Setup (Recommended):

    gemgroq --setup
    

    This will prompt you for your API keys and save them securely.

  2. Manual Setup:

    • Create a .env file 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"
      )
      

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)

Source distribution for gemgroq 0.1.2
File Size Uploaded
gemgroq-0.1.2.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gemgroq 0.1.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page