Skip to main content

LangChain tools for DocAPI — generate PDFs, screenshots, and invoices via API

Project description

langchain-docapi

LangChain tools for DocAPI — generate PDFs, screenshots, and invoices via API.

Installation

pip install langchain-docapi

Quick Start

from langchain_docapi import DocAPIPDFTool, DocAPIScreenshotTool, DocAPIInvoiceTool
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_openai import ChatOpenAI

tools = [
    DocAPIPDFTool(api_key="your-docapi-key"),
    DocAPIScreenshotTool(api_key="your-docapi-key"),
    DocAPIInvoiceTool(api_key="your-docapi-key"),
]

llm = ChatOpenAI(model="gpt-4o")
agent = create_tool_calling_agent(llm, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools)

agent_executor.invoke({"input": "Generate a PDF from <h1>Hello World</h1>"})

Documentation

See the DocAPI docs for full API reference.

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_docapi-0.1.0.tar.gz (3.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_docapi-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file langchain_docapi-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_docapi-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for langchain_docapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1391cee123d9ec06ade9b249ff82f6cf407b6667790398be01ce9f9d7fa61424
MD5 8fc7016f97fd5561e8f93fc3822e9fd6
BLAKE2b-256 67913db11d0e73a266a020153902bee619242e42ed2d8356279ea4f9b1ec9b83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_docapi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ee9b80cc0e9ea2a2785f9aee29e427e5f0700f719ee8fb80efbb16eb1428885
MD5 6e6cbe529f4ba3f1741eef95c3dc8c12
BLAKE2b-256 ea2ba941003ce060c8cb0b7235df2aec9235be64ab4a1ec636239b4daa3d05c2

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