Skip to main content

A flexible framework for integrating multiple AI chat providers

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.0.tar.gz (5.9 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.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmeasy-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 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.0.tar.gz
Algorithm Hash digest
SHA256 19767170900658e5c58ef8f10b41b991a79425cc57cf41b1bbad7031ba1ea856
MD5 8fc4e6ec90b89530ca5079374f384c8c
BLAKE2b-256 5cc150915fa0d87d0e0f67e23cc2eb3a759b92ef0c3d0287282e59440efa4e6b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmeasy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d63f15ec414c32fe9c468036fb22fc5c52a7137c98974a536e29375246d59915
MD5 acc5b5915dca5c20ba3a2351d83a4aa4
BLAKE2b-256 1873fcbde166a94ef3e4eec6605dfe82e9c8a4ba72dabee22396aaa171eaa83b

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