Skip to main content

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

langchain_apertis-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_apertis-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

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

Hashes for langchain_apertis-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dde7515f6184a9108e8327fc50e3900b57aae14cf29012f826dc76a298b1694e
MD5 ca564032ed4f1d89191309aa2ed47d3e
BLAKE2b-256 f94ffe59fcbac41fcf4ef27ef49f8af709fcfe0e9e4ef87d2894a16b47434ecd

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_apertis-0.1.0.tar.gz:

Publisher: publish.yml on apertis-ai/langchain-apertis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for langchain_apertis-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35980e7e4d31b40ebbc73e4b9b43b59b4e905a2b2ff31f4a659b1361f96e09a1
MD5 c708becaee0991048889725cca4b3041
BLAKE2b-256 fb67bdf0f7d2c945f4dff802c6b8bf4b900c06e302c911fbbf5f42b04f8f498a

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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