langchain-empiriolabs
This package contains the LangChain integration for EmpirioLabs AI.
EmpirioLabs AI is specialized AI model hosting for open, proprietary, and custom stacks. Every model it serves is listed, with its ID and price, in the live catalog at empiriolabs.ai/models.
Installation
pip install -U langchain-empiriolabs
Set your API key as an environment variable:
export EMPIRIOLABS_API_KEY="your-api-key"
You can create a key from the EmpirioLabs AI dashboard.
Chat models
ChatEmpirioLabs wraps the EmpirioLabs chat completions API.
from langchain_empiriolabs import ChatEmpirioLabs
llm = ChatEmpirioLabs(model="MODEL_ID") # any chat model ID from empiriolabs.ai/models
response = llm.invoke("Explain backpropagation in one paragraph.")
print(response.content)
Streaming:
for chunk in llm.stream("Write a haiku about the sea."):
print(chunk.content, end="", flush=True)
Tool calling:
from pydantic import BaseModel, Field
class GetWeather(BaseModel):
"""Get the current weather in a given location."""
location: str = Field(..., description="The city and state, e.g. San Francisco, CA")
llm_with_tools = llm.bind_tools([GetWeather])
print(llm_with_tools.invoke("What is the weather in SF?").tool_calls)
Available models
Any chat model ID from the live catalog works: empiriolabs.ai/models, or GET https://api.empiriolabs.ai/v1/models from code. The catalog changes as models are added and retired, so this page names none.
Reasoning models place their chain-of-thought in response.additional_kwargs["reasoning_content"].
Embeddings
EmpirioLabsEmbeddings wraps the EmpirioLabs embeddings API.
from langchain_empiriolabs import EmpirioLabsEmbeddings
embeddings = EmpirioLabsEmbeddings(model="MODEL_ID") # any embedding model ID from empiriolabs.ai/models
vector = embeddings.embed_query("Hello, world!")
print(len(vector))
A request takes up to 2,048 texts; embed_documents sends 1,000 per request by default (chunk_size).
Configuration
| Argument | Environment variable | Default |
|---|---|---|
api_key |
EMPIRIOLABS_API_KEY |
(required) |
base_url |
EMPIRIOLABS_API_BASE |
https://api.empiriolabs.ai/v1 |
License
MIT
Metadata
Release files for langchain-empiriolabs 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_empiriolabs-0.1.4.tar.gz | 10.2 kB | With provenance | Details for langchain_empiriolabs-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_empiriolabs-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for langchain_empiriolabs-0.1.4-py3-none-any.whl |
Total release size: 18.3 kB
Release files / langchain_empiriolabs-0.1.4.tar.gz
| Download URL | langchain_empiriolabs-0.1.4.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce5e03134695e88ccd538694a3cdcf4f97c96b3a7e11957679f0750363a5e04d
|
|
BLAKE2b-256 checksum How to use checksums |
137b0a2d22fb65d8c36c4bbc12f4c628dda328f6da010f22bf6795008e7753cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / langchain_empiriolabs-0.1.4-py3-none-any.whl
| Download URL | langchain_empiriolabs-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16edb1d637e39d8a95718ac02c001c94f15a7e8b494142016273eb9c0103cef8
|
|
BLAKE2b-256 checksum How to use checksums |
8b106526d3705dc292ce53b00d1c1967d64fba0310590f1b239b07e6b6bda42e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for langchain-empiriolabs 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for langchain_empiriolabs-0.1.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.