Upstage Document Parsing Plugin for Dify
A powerful document parsing plugin for the Dify platform that leverages the Upstage Document Parse API to convert various document formats into structured Markdown, HTML, or plain text.
Features
- Broad format support: Handles PDF, DOCX, and various image formats
- Intelligent document understanding: Extracts text, tables, charts, and figures while preserving original structure
- Multiple output formats: Converts documents to Markdown, HTML, or plain text
- Efficient caching: Content-based caching prevents reprocessing of identical files
- OCR capability: Extracts text from scanned documents and images
- Chart recognition: Identifies and extracts charts from documents
- Batch processing: Efficiently processes multi-page documents
- Coordinate extraction: Obtains bounding box coordinates for document elements
Installation
This plugin is under active development.
Configure the plugin in the Dify platform.
Configuration
Required credentials
The plugin requires the following credentials:
Parameter options
You can configure the following parameters when using the tool:
- : Output format (options: "md", "html", "text")
- : Whether to return the result as a file or text (options: "file", "text")
Usage
In a Dify application
- Add the Upstage Document Parse tool to your application.
- Configure the required credentials.
- Use the tool within your application flow to process documents.
Direct usage in Python
You can also use the client directly in Python:
API Parameters
The plugin uses the following parameters when calling the Upstage Document Parse API:
Caching Mechanism
The plugin implements an efficient caching system:
- File content hashing to identify duplicate documents
- Result caching based on content hash and output format
- TTL-based cache expiration (default: 1 hour)
Examples
Convert a PDF to Markdown
Handling large documents
Development
Project structure
- : Main Dify plugin integration
- : Core client that interacts with the Upstage API
- : Python dependencies