langchain-apertis
Native LangChain integration for the
Apertis AI API. It uses the official apertis SDK directly and
does not depend on langchain-openai.
Installation
pip install -U langchain-apertis
export APERTIS_API_KEY="..."
Chat completions
from langchain_apertis import ChatApertis
llm = ChatApertis(model="gpt-5.5", temperature=0)
print(llm.invoke("Explain what a native LangChain provider is.").text)
bind_tools() and with_structured_output() use Apertis' OpenAI-compatible tool
format. A current Web Search model keeps its exact :web model suffix and exposes
source records safely in response_metadata["apertis"]["web_sources"].
search = ChatApertis(
model="gpt-5.5:web",
web_results_count=5,
web_content_length="medium",
)
response = search.invoke("What changed in this week's AI news?")
print(response.response_metadata["apertis"]["web_sources"])
Development verification
The public package metadata resolves published apertis>=0.3.0 from PyPI.
uv sync --group dev
uv run pytest -m "not integration"
uv build
docker build -t langchain-apertis-test -f Dockerfile.test .
docker run --rm --network none langchain-apertis-test
Publishing
After apertis>=0.3.0 is available on PyPI, configure PyPI Trusted Publishing for
apertis-ai/langchain-apertis, .github/workflows/publish.yml, and the pypi
environment. The manual Publish to PyPI workflow uploads only when dispatched with
the publish confirmation value.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_apertis-0.1.0.tar.gz.
File metadata
- Download URL: langchain_apertis-0.1.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dde7515f6184a9108e8327fc50e3900b57aae14cf29012f826dc76a298b1694e
|
|
| MD5 |
ca564032ed4f1d89191309aa2ed47d3e
|
|
| BLAKE2b-256 |
f94ffe59fcbac41fcf4ef27ef49f8af709fcfe0e9e4ef87d2894a16b47434ecd
|
Provenance
The following attestation bundles were made for langchain_apertis-0.1.0.tar.gz:
Publisher:
publish.yml on apertis-ai/langchain-apertis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_apertis-0.1.0.tar.gz -
Subject digest:
dde7515f6184a9108e8327fc50e3900b57aae14cf29012f826dc76a298b1694e - Sigstore transparency entry: 2365824685
- Sigstore integration time:
-
Permalink:
apertis-ai/langchain-apertis@db63f0d5b8c823961cd8ba26bfbac99e625ed0d8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/apertis-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@db63f0d5b8c823961cd8ba26bfbac99e625ed0d8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file langchain_apertis-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_apertis-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35980e7e4d31b40ebbc73e4b9b43b59b4e905a2b2ff31f4a659b1361f96e09a1
|
|
| MD5 |
c708becaee0991048889725cca4b3041
|
|
| BLAKE2b-256 |
fb67bdf0f7d2c945f4dff802c6b8bf4b900c06e302c911fbbf5f42b04f8f498a
|
Provenance
The following attestation bundles were made for langchain_apertis-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on apertis-ai/langchain-apertis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_apertis-0.1.0-py3-none-any.whl -
Subject digest:
35980e7e4d31b40ebbc73e4b9b43b59b4e905a2b2ff31f4a659b1361f96e09a1 - Sigstore transparency entry: 2365824737
- Sigstore integration time:
-
Permalink:
apertis-ai/langchain-apertis@db63f0d5b8c823961cd8ba26bfbac99e625ed0d8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/apertis-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@db63f0d5b8c823961cd8ba26bfbac99e625ed0d8 -
Trigger Event:
workflow_dispatch
-
Statement type: