Skip to main content

llm-clients

A reusable library for LLM clients with LangChain.

Supports OpenAI, Anthropic, Azure OpenAI, Google Gemini, and HuggingFace.

Install

# Core only
pip install llm-clients

# With specific provider(s)
pip install "llm-clients[openai]"
pip install "llm-clients[anthropic]"
pip install "llm-clients[azure]"
pip install "llm-clients[google]"
pip install "llm-clients[huggingface]"

# All providers
pip install "llm-clients[all]"

Quick start

from llm_clients import LLMClientFactory

# Create any LLM (reads API keys from env vars by default)
llm = LLMClientFactory.create("openai", model="gpt-4o")
llm = LLMClientFactory.create("anthropic")
llm = LLMClientFactory.create("azure", azure_deployment="...", azure_endpoint="...")
llm = LLMClientFactory.create("google", model="gemini-2.0-flash")
llm = LLMClientFactory.create("huggingface", repo_id="HuggingFaceH4/zephyr-7b-beta")

Environment variables

Variable Provider
OPENAI_API_KEY OpenAI
ANTHROPIC_API_KEY Anthropic
AZURE_OPENAI_API_KEY Azure
GOOGLE_API_KEY Google Gemini
HUGGINGFACEHUB_API_TOKEN HuggingFace

Metadata

Release files for llm-clients 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-clients 0.1.2
File Size Uploaded
llm_clients-0.1.2.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-clients 0.1.2
File Interpreter ABI Platform
llm_clients-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / llm_clients-0.1.2.tar.gz

Download URL llm_clients-0.1.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
29d02de172de3c3b7e4ffef3388a6dc9ff08c8ccf33663b8db290205b6b63641
BLAKE2b-256 checksum
How to use checksums
e9b46b42551bfc5d0155355e89fbbaf587442d2ec7f6c5178df4eedd6d2349c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / llm_clients-0.1.2-py3-none-any.whl

Download URL llm_clients-0.1.2-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0c648a9d4c6080f123380fdec610307d70894f7caadfb23725e8f0bd7249f57
BLAKE2b-256 checksum
How to use checksums
3d58f40ab9e568653544b3f1f719a744f5b7b81e862012f78888540a20d30f37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page