Llama Parse, the world's first genAI-native document parsing platform - built with LLMs and for LLM use cases. https://docs.llamaindex.ai/en/stable/llama_cloud/Llama Parse/
LlamaParse is a GenAI-native document parser that can parse complex document data for any downstream LLM use case (RAG, agents). This plugin integrates LlamaParse capabilities into the Dify platform.
✅ Broad file type support: Parse various unstructured file types (.pdf, .pptx, .docx, .xlsx, .html) with text, tables, visual elements, and complex layouts.
✅ Table recognition: Accurately parse embeddLed tables into text and semi-structured representations.
✅ Multimodal parsing: Extract visual elements (images/diagrams) into structured formats using the latest multimodal models.
✅ Custom parsing: Customize output through custom prompt instructions.
✅ Advanced LLM Mode: Enhanced parsing with LLM-powered layout reconstruction, target pages, max pages, and custom prompts.
This plugin provides two tools:
The standard LlamaParse tool with basic parsing capabilities.
An advanced version with enhanced features:
parse_mode="parse_page_with_llm"
for better layout reconstructionFor file upload functionality, configure the FILES_URL
environment variable in your Dify .env
file:
FILES_URL=http://api:5001
FILES_URL=http://YOUR_DIFY_HOST_IP:5001
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
files | files | Yes | - | Files to be parsed |
result_type | select | No | markdown | Output format (txt or md) |
num_workers | number | No | 4 | Number of parallel workers for processing multiple files |
verbose | boolean | No | false | Enable detailed output logging |
language | string | No | "en" | Output language (e.g., "en" for English) |
The advanced tool includes all standard parameters plus:
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
target_pages | string | No | - | Specific pages to parse (e.g., "0,2,7") |
max_pages | number | No | - | Maximum number of pages to parse |
system_prompt | string | No | - | Custom system prompt (use with caution) |
user_prompt | string | No | - | Custom user prompt for content transformation |
Python1# Basic parsing 2result = llama_parse( 3 files=[document.pdf], 4 result_type="markdown" 5)
Python1# Parse specific pages with custom prompts 2result = llama_parse_advanced( 3 files=[document.pdf], 4 result_type="markdown", 5 target_pages="0,2,7", 6 max_pages=10, 7 system_prompt="Output as structured report", 8 user_prompt="Translate to English if not already in English" 9)
The plugin provides three types of output for each processed file:
Text Message
JSON Message
{ filename: [{ text: string, metadata: object }] }
Blob Message
This plugin is powered by LlamaParse, a powerful document parsing service by LlamaIndex.