langchain-tensorlake
langchain-tensorlake provides seamless integration between Tensorlake and LangChain, enabling you to build sophisticated document processing agents with structured extraction workflows.
Installation
pip install -U langchain-tensorlake
Quick Start
1. Set up your environment
You should configure credentials for Tensorlake and OpenAI by setting the following environment variables:
export TENSORLAKE_API_KEY="your-tensorlake-api-key"
export OPENAI_API_KEY = "your-openai-api-key"
Get your Tensorlake API key from the Tensorlake Cloud Console. New users get 100 free credits!
2. Do the necessary imports
from langchain_tensorlake import DocumentParserOptions, document_markdown_tool
from langgraph.prebuilt import create_react_agent
import asyncio
import os
3. Build a Signature Detection Agent
async def main(question):
# Create the agent with the Tensorlake tool
agent = create_react_agent(
model="openai:gpt-4o-mini",
tools=[document_markdown_tool],
prompt=(
"""
I have a document that needs to be parsed. \n\nPlease parse this document and answer the question about it.
"""
),
name="real-estate-agent",
)
# Run the agent
result = await agent.ainvoke({"messages": [{"role": "user", "content": question}]})
# Print the result
print(result["messages"][-1].content)
4. Example Usage
# Define the path to the document to be parsed
path = "path/to/your/document.pdf"
# Define the question to be asked and create the agent
question = f"What contextual information can you extract about the signatures in my document found at {path}?"
if __name__ == "__main__":
asyncio.run(main(question))
Customization
You can configure how documents are parsed using DocumentParserOptions, such as:
chunking_strategy: fragment, page, or sectiondetect_tables: enable or disable table extractiondetect_signatures: flag signature pages
Metadata
Release files for langchain-tensorlake 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_tensorlake-0.1.8.tar.gz | 5.1 kB | Without provenance | Details for langchain_tensorlake-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_tensorlake-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for langchain_tensorlake-0.1.8-py3-none-any.whl |
Total release size: 10.9 kB
Release files / langchain_tensorlake-0.1.8.tar.gz
| Download URL | langchain_tensorlake-0.1.8.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27f6fd78047b248255530ae0a02d4cbf3c09b5efaeaf448e7e0cd3f6fec019e5
|
|
BLAKE2b-256 checksum How to use checksums |
cb7599d8cc5b7511abc2261500559f1564e330d431e66f9a0aae88aa9977db2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Release files / langchain_tensorlake-0.1.8-py3-none-any.whl
| Download URL | langchain_tensorlake-0.1.8-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1290fda0ea828d08c73d57a03fb5bc08aa0c4b95847b9c19450be22ff4e5b38e
|
|
BLAKE2b-256 checksum How to use checksums |
7d6bd927052fa677cc048a333b1f3c6428e6232635db2e9c17549b423e429540
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Security for langchain-tensorlake 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.