Skip to main content

A lightweight wrapper for multiple LLM providers with optional LangChain integrations.

Project description

gen-wrapper

PyPI Python License: MIT

A unified interface for multiple LLM providers (OpenAI, Anthropic, Groq, DeepSeek, Fireworks, Gemini, local).

Installation

pip install gen-wrapper
# or with extras
pip install "gen-wrapper[llm-providers,langchain,async]"

Environment

Set needed API keys, e.g. (PowerShell):

$env:OPENAI_API_KEY="your_openai_key"
$env:ANTHROPIC_API_KEY="your_anthropic_key"
$env:GROQ_API_KEY="your_groq_key"
$env:DEEPSEEK_API_KEY="your_deepseek_key"
$env:FIREWORKS_API_KEY="your_fireworks_key"
$env:GOOGLE_API_KEY="your_google_key"

# Azure OpenAI (optional)
$env:AZURE_OPENAI_API_KEY="..."
$env:AZURE_OPENAI_ENDPOINT="..."
$env:AZURE_OPENAI_DEPLOYMENT="..."
$env:AZURE_OPENAI_API_VERSION="..."

Quickstart (Python)

from gen_wrapper import LLMWrapper

wrapper = LLMWrapper(provider="openai", model="gpt-4o")
print(wrapper.simple_chat("Hello!"))

CLI

llm-cli --list-providers
llm-cli --list-models openai
llm-cli --provider openai --prompt "Hello world"

Extras

  • llm-providers: OpenAI, Anthropic, Google Generative AI SDKs
  • langchain: LangChain core + provider adapters
  • async: aiohttp, httpx
  • monitoring: prometheus-client

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gen_wrapper-0.1.1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gen_wrapper-0.1.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file gen_wrapper-0.1.1.tar.gz.

File metadata

  • Download URL: gen_wrapper-0.1.1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for gen_wrapper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1a3cb276573dd69213c10604e0dfeb1498d67923623dcc937f1712dffca975a8
MD5 194887b28ac32435451af84c967e585c
BLAKE2b-256 9411c6aca18c4284bdd1f5e1a14763e8166b352ba1c3a17ec80e777268b9ef21

See more details on using hashes here.

File details

Details for the file gen_wrapper-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gen_wrapper-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for gen_wrapper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 773a8209658a47275a30ae227f946034b05e471bee5a65fabe51b2ce2ce7af10
MD5 a5d5a65d8c21496e176dfd6f843c8a81
BLAKE2b-256 2c0add9b888d1758e3316e105b36b36e3bc3d9b3e553bd9d440c4ca71eb1fcfe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page