Skip to main content

Easy to use LLM interface

Project description

AI Chat Framework

A flexible framework for integrating multiple AI chat providers (OpenAI, Claude, Gemini, Mistral, Grok).

Installation

pip install llmeasy

Setup

  1. Copy .env.example to .env
  2. Add your API keys to .env
  3. Install dependencies: poetry install

Environment Variables

API Keys

  • ANTHROPIC_API_KEY
  • OPENAI_API_KEY
  • GOOGLE_API_KEY
  • MISTRAL_API_KEY
  • GROK_API_KEY

Models

  • CLAUDE_MODEL (default: claude-3-sonnet-20240229)
  • OPENAI_MODEL (default: gpt-4-turbo-preview)
  • GEMINI_MODEL (default: gemini-pro)
  • MISTRAL_MODEL (default: mistral-large-latest)
  • GROK_MODEL (default: grok-beta)

Config

  • MAX_TOKENS (default: 1000)
  • TEMPERATURE (default: 0.7)

Examples

Run all examples:

python examples/run_all_examples.py

Available examples in examples/:

  • Basic usage
  • Provider-specific implementations
  • Advanced patterns
  • Custom templates
  • Provider comparisons
  • Streaming
  • Provider chaining

Features

  • Multi-provider support
  • Async/await
  • Streaming responses
  • Custom templates
  • Provider chaining
  • Error handling
  • Type hints

License

Apache License 2.0

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

llmeasy-0.1.2.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

llmeasy-0.1.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file llmeasy-0.1.2.tar.gz.

File metadata

  • Download URL: llmeasy-0.1.2.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/23.6.0

File hashes

Hashes for llmeasy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 da6e3ed0e69f189f171c5125550cd37a9eed667f4a80224a09d8ab22c5cf8cbd
MD5 8887e8e28fc772be06fe999479e7978d
BLAKE2b-256 7f592eca3d0d2a244132a4f4cc68f4db84a5a98bbed26c41cc5d88f6f849883d

See more details on using hashes here.

File details

Details for the file llmeasy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: llmeasy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/23.6.0

File hashes

Hashes for llmeasy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d33e7c6ef1f0df4cd4e3d7e312957c0bf6533f0997ce3aecb670c39cd2233ce
MD5 12d4017760a6f42f47f8bdfaa493066f
BLAKE2b-256 93433002231b599d676f555388dc6b5a2d6f1923e2d3edf3442144e3e5335384

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