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
Release history Release notifications | RSS feed
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_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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95d542cd183399f9473095fb84666f9ca7f998c55093a9e0b6bde4ae8887c4ae
|
|
| MD5 |
a98be12df0605831bef324d9b3e7d307
|
|
| BLAKE2b-256 |
bde42cbe394a47dea2ca83f0070a2577a7528e9f56f3ffa0bfde2dc499457c38
|
File details
Details for the file langchain_ledgerproof-1.0.0-py3-none-any.whl.
File metadata
- Download URL: langchain_ledgerproof-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c53c0ebfbb983663da33471979c7d977cea8f6a824e9d37f3449400f5fff8446
|
|
| MD5 |
148c88e8a5ae3ac941643c7b892ad80f
|
|
| BLAKE2b-256 |
75e9126086062a1a78dae041edc4c3ac1df4571e0476629eee521861bd63b960
|