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

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmeasy-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 6a610a5e52f32234ece5959aad44ef26f5ab71114e28fbb82739536927caaa55
MD5 a091ee5cc6f8600e2a8b425132d0a43c
BLAKE2b-256 19b5395a67bb92fa8f0eab0b600c0b9ed711c1d8b0df1d7fabec708dc909e674

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmeasy-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 730783e9fae63071bb55720dbb62ad9a7503780a803ebbf30082c5f8f743887a
MD5 1e3de3b3dfc022779fbe1cf32dc9cd62
BLAKE2b-256 00f6da26052d951a74ee012c4b77ea9e0694d3a8eed38eb1c0021446741f2d9d

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