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.4.tar.gz (11.2 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.4-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmeasy-0.1.4.tar.gz
  • Upload date:
  • Size: 11.2 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.4.tar.gz
Algorithm Hash digest
SHA256 45aa7999a8e19c1a0fca2717274e49e81ccacad3297adaadaf44de8c29afed6b
MD5 9b2db050d95ba3ab3650bc3d6017ca3f
BLAKE2b-256 4817e2200ade96f35c834163b9072b6153f830f78a58f7f4a585e92a09663e38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmeasy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 17.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5d5b43954d2ec031f2fba4d368aa814137c66ce87bc5368ae4fe641bac6e13d4
MD5 c06b3f5adf5ae71befd41c60978b5b17
BLAKE2b-256 2ff20a27da83b8b327e7021d4036469843e8af455cc5dcab380ab8f470d39bb6

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