Skip to main content

LangChain callback that auto-issues LPR Article 50 receipts for every LLM call.

Project description

langchain-ledgerproof

LangChain callback that auto-issues EU AI Act Article 50 receipts for every LLM call.

pip install langchain-ledgerproof
from langchain_anthropic import ChatAnthropic
from langchain_ledgerproof import LedgerProofCallbackHandler

callback = LedgerProofCallbackHandler(
    publisher_id="LEI:5493001KJTIIGC8Y1R12",
    deployer_country="DE",
    deployer_name="Acme Corp",
)

llm = ChatAnthropic(model="claude-sonnet-4-6", callbacks=[callback])
response = llm.invoke("Write a haiku about Bitcoin.")
# Receipt issued automatically. Your code is now Article 50 compliant.

Works with any LangChain LLM (Chat or Completion). Each invocation in a chain or agent gets its own receipt. Background issuance — your chain isn't blocked.

Configuration

Reads LEDGERPROOF_API_KEY from the environment if not passed.

See the main ledgerproof package for the full Article 50 protocol.

License

Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_ledgerproof-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

langchain_ledgerproof-1.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file langchain_ledgerproof-1.0.0.tar.gz.

File metadata

  • Download URL: langchain_ledgerproof-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for langchain_ledgerproof-1.0.0.tar.gz
Algorithm Hash digest
SHA256 95d542cd183399f9473095fb84666f9ca7f998c55093a9e0b6bde4ae8887c4ae
MD5 a98be12df0605831bef324d9b3e7d307
BLAKE2b-256 bde42cbe394a47dea2ca83f0070a2577a7528e9f56f3ffa0bfde2dc499457c38

See more details on using hashes here.

File details

Details for the file langchain_ledgerproof-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_ledgerproof-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c53c0ebfbb983663da33471979c7d977cea8f6a824e9d37f3449400f5fff8446
MD5 148c88e8a5ae3ac941643c7b892ad80f
BLAKE2b-256 75e9126086062a1a78dae041edc4c3ac1df4571e0476629eee521861bd63b960

See more details on using hashes here.

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