Dify logo
Dify logo
Marketplace
plugin-langgenius/llama_parse-logo
Llama Parse
0.0.3

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/

langgenius/llama_parse891 installs

LlamaParse Dify Plugin

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.

Features

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.

Tools Included

This plugin provides two tools:

1. Llama Parse (Standard)

The standard LlamaParse tool with basic parsing capabilities.

2. Llama Parse Advanced (LLM Mode)

An advanced version with enhanced features:

  • LLM Mode: Uses parse_mode="parse_page_with_llm" for better layout reconstruction
  • Target Pages: Parse specific pages using comma-separated page numbers (e.g., "0,2,7")
  • Max Pages: Limit the maximum number of pages to parse
  • System Prompt: Override default LlamaParse system prompt (use with caution)
  • User Prompt: Transform or modify parsed content (e.g., translation, summarization)

Getting Started

API Key Setup

  1. Visit https://cloud.llamaindex.ai/api-key to create an account
  2. Generate your API key
  3. Configure the API key in your Dify plugin settings

Configuration Setup

For file upload functionality, configure the FILES_URL environment variable in your Dify .env file:

  • Docker Compose: FILES_URL=http://api:5001
  • Other deployments: FILES_URL=http://YOUR_DIFY_HOST_IP:5001

Usage Limits

  • Free plan: Up to 1000 pages per day
  • Paid plan: 7000 free pages per week + $0.003 per additional page

Parameters

Standard Tool Parameters

ParameterTypeRequiredDefaultDescription
filesfilesYes-Files to be parsed
result_typeselectNomarkdownOutput format (txt or md)
num_workersnumberNo4Number of parallel workers for processing multiple files
verbosebooleanNofalseEnable detailed output logging
languagestringNo"en"Output language (e.g., "en" for English)

Advanced Tool Parameters

The advanced tool includes all standard parameters plus:

ParameterTypeRequiredDefaultDescription
target_pagesstringNo-Specific pages to parse (e.g., "0,2,7")
max_pagesnumberNo-Maximum number of pages to parse
system_promptstringNo-Custom system prompt (use with caution)
user_promptstringNo-Custom user prompt for content transformation

Usage Examples

Standard Tool

Python
1# Basic parsing 2result = llama_parse( 3 files=[document.pdf], 4 result_type="markdown" 5)

Advanced Tool

Python
1# 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)

Output Format

The plugin provides three types of output for each processed file:

  1. Text Message

    • Plain text concatenation of all parsed documents, separated by "---"
  2. JSON Message

    • Structure: { filename: [{ text: string, metadata: object }] }
    • Contains parsed text and associated metadata for each document
  3. Blob Message

    • Binary content with appropriate MIME type:
      • JSON: "application/json"
      • Markdown: "text/markdown"
      • Text: "text/plain"

Credits

This plugin is powered by LlamaParse, a powerful document parsing service by LlamaIndex.

CATEGORY
Tool
TAGS
#Utilities
VERSION
0.0.3
langgenius·2025-07-01 02:46:29
REQUIREMENTS
LLM invocation
Tool invocation
Maximum memory
1MB