NeuForge Pay for LangChain (neuforge-langchain)
A LangChain callback handler that natively implements the Bounded Overshoot x402 token metering protocol.
Usage
from neuforge_langchain import NeuForgeCallbackHandler
from langchain_openai import ChatOpenAI
handler = NeuForgeCallbackHandler(daily_budget_usd=5.0)
llm = ChatOpenAI(callbacks=[handler])
# If this generation pushes you over the $5.00 limit, a PaymentRequiredException is thrown!
response = llm.invoke("Write a very long story.")
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 neuforge_langchain-0.1.0.tar.gz.
File metadata
- Download URL: neuforge_langchain-0.1.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6462fa36ecbb8bdfc1c8797c4d1e787ffbda96623a8b0b77e656b420804322b9
|
|
| MD5 |
443516ad7dbb90302398b2995e4d24d1
|
|
| BLAKE2b-256 |
5832bd17e90fc8619e48138c96542a05f7eedb50a45ce94d7b8055ad95ee7f84
|
File details
Details for the file neuforge_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: neuforge_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e0659fe1ed3bd0b97ab1a816be3a30f3b12a18aebf3c67ae66faa342183e794
|
|
| MD5 |
e3edbccf1c134267e96b2aba05057dcc
|
|
| BLAKE2b-256 |
0ae63b2546a75ef22c1bd025f1dc572a574a9a47c45982104eca2b1394d2122c
|