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.1.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.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmeasy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 05e33abdd5d29663fed2163e23411d92622a8b7f83ac1da8e77a3f4f27a397b0
MD5 00f9ff465cfc29ef6ba78723996ed412
BLAKE2b-256 d7004d9a875eec76c5a9957805820b79df31c9ce9fd4c7377c8d43518b48eb9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmeasy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58bd7821f89ff36ede81bba722aa480ff31d68ec45df07c1b6b00fd82479b9f2
MD5 99dfb80123de7f9cc7ded398ef2aa626
BLAKE2b-256 01e7e37b20fdffec44b5296769b97b254557b01c72c979cdca2166b0fb04e896

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