Skip to main content

langchain-empiriolabs

This package contains the LangChain integration for EmpirioLabs AI.

EmpirioLabs AI is specialized AI model hosting for open, proprietary, and custom stacks. Its chat models include Qwen3, DeepSeek V4, GLM-5.1, Kimi K2.7 Code and MiniMax M3; browse the full model catalog at docs.empiriolabs.ai.

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="qwen3-7-plus")

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 model slug from the EmpirioLabs AI catalog works. Some popular chat slugs:

Slug Notes
qwen3-7-plus General-purpose chat (default)
qwen3-7-max Highest-capability Qwen3
deepseek-v4-pro Reasoning model
deepseek-v4-1-flash Fast
glm-5-1 GLM-5.1
kimi-k2-7-code Coding-focused, reasoning
minimax-m3 MiniMax M3

Reasoning models place their chain-of-thought in response.additional_kwargs["reasoning_content"].

The live list is always available from GET https://api.empiriolabs.ai/v1/models.

Embeddings

EmpirioLabsEmbeddings wraps the EmpirioLabs embeddings API.

from langchain_empiriolabs import EmpirioLabsEmbeddings

embeddings = EmpirioLabsEmbeddings(model="text-embedding-v4")

vector = embeddings.embed_query("Hello, world!")
print(len(vector))

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.1

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

Source distribution (sdist)

Source distribution for langchain-empiriolabs 0.1.1
File Size Uploaded Provenance
langchain_empiriolabs-0.1.1.tar.gz 9.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-empiriolabs 0.1.1
File Interpreter ABI Platform
langchain_empiriolabs-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / langchain_empiriolabs-0.1.1.tar.gz

Download URL langchain_empiriolabs-0.1.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c93e09b3f38e0969408671404a63ed77f44ff6a9cd3bc41e39bfd2d7c798229c
BLAKE2b-256 checksum
How to use checksums
2bc330327cb25e44988e63c2387b04daf3aa73df5068e78eeff9357794bdfaac
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 23, 2026.

Transparency log

Release files / langchain_empiriolabs-0.1.1-py3-none-any.whl

Download URL langchain_empiriolabs-0.1.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89c5e59ffbaf8f6802060dfbc1414c2d4c7f301af32ca6abd2f2627fb049e956
BLAKE2b-256 checksum
How to use checksums
72b5e15a0a70b3f4a4fd6139347a55959a8a7ea6002b9bc0b74e4dd4b56aaa6c
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 23, 2026.

Transparency log

Security for langchain-empiriolabs 0.1.1

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.

Select from 2 files

Attestation for langchain_empiriolabs-0.1.1.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 23, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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