Skip to main content

A unified interface for various LLM providers

Project description

ModelsHub

A unified interface for various Large Language Model (LLM) providers, making it easy to work with different LLM APIs in a consistent way.

Installation

pip install modelshub

Quick Start

from modelshub import Gemini, OpenAI, Groq, Anthropic

# Initialize any model
model = Gemini(api_key="your-api-key")
# or
model = OpenAI(api_key="your-api-key")
# or
model = Groq(api_key="your-api-key")
# or
model = Anthropic(api_key="your-api-key")

# Use the model
response = model.generate("What is the capital of France?")
print(response)

Features

  • Unified interface for multiple LLM providers
  • Easy to use and extend
  • Production-ready implementation
  • Consistent API across different providers
  • Built on top of LangChain for maximum compatibility

Supported Models

  • Google Gemini
  • OpenAI
  • Groq
  • Anthropic Claude
  • (More coming soon!)

Environment Variables

You can set your API keys as environment variables:

export GOOGLE_API_KEY="your-google-api-key"
export OPENAI_API_KEY="your-openai-api-key"
export GROQ_API_KEY="your-groq-api-key"
export ANTHROPIC_API_KEY="your-anthropic-api-key"

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

modelshub-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

modelshub-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file modelshub-0.1.0.tar.gz.

File metadata

  • Download URL: modelshub-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for modelshub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f60e331ebd12f3b5b105a598212c7605701ef4bbc93fce594c0966347d31145e
MD5 3d66e5d5036304f1cad3170502e510fd
BLAKE2b-256 0edf44ca7de7d63134f8dbcea4b5b6de1270db833573ca7d9fdb82f67e521be4

See more details on using hashes here.

File details

Details for the file modelshub-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: modelshub-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for modelshub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0297d0c50a6bfdf957563bde34b03d18cdc065cc2f95379e47480b5d36a5015d
MD5 fdc89daaad537af6c7f73843e23eece0
BLAKE2b-256 be8efe98e0e552c696369232edc3695f23438fd2259410cb5f024bd81a7af685

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