使用 LLM 和 LLM Vision (OCR) 处理无纸化 - 由 AI 提供支持的文档数字化
Maintained by Icereed. Proudly supported by BubbleTax.de – automated, BMF-compliant tax reports for Interactive Brokers traders in Germany.
paperless-gpt seamlessly pairs with [paperless-ngx][paperless-ngx] to generate AI-powered document titles and tags, saving you hours of manual sorting. While other tools may offer AI chat features, paperless-gpt stands out by supercharging OCR with LLMs-ensuring high accuracy, even with tricky scans. If you're craving next-level text extraction and effortless document organization, this is your solution.
https://github.com/user-attachments/assets/bd5d38b9-9309-40b9-93ca-918dfa4f3fd4
❤️ Support This Project
If paperless-gpt is helping you organize your documents and saving you time, please consider sponsoring its development. Your support helps ensure continued improvements and maintenance!
LLM-Enhanced OCR
Harness Large Language Models (OpenAI or Ollama) for better-than-traditional OCR—turn messy or low-quality scans into context-aware, high-fidelity text.
Use specialized AI OCR services
Automatic Title, Tag & Created Date Generation
No more guesswork. Let the AI do the naming and categorizing. You can easily review suggestions and refine them if needed.
Supports reasoning models in Ollama
Greatly enhance accuracy by using a reasoning model like qwen3:8b. The perfect tradeoff between privacy and performance! Of course, if you got enough GPUs or NPUs, a bigger model will enhance the experience.
Automatic Correspondent Generation
Automatically identify and generate correspondents from your documents, making it easier to track and organize your communications.
Automatic Custom Field Generation
Extract and populate custom fields from your documents. Configure which fields to target and how they should be filled. This feature must be enabled in the settings, and you must select at least one custom field for it to function. Three write modes are available:
Searchable & Selectable PDFs
Generate PDFs with transparent text layers positioned accurately over each word, making your documents both searchable and selectable while preserving the original appearance.
Extensive Customization
default_prompts and prompts directory structure, ensuring your customizations are persistent.Simple Docker Deployment
A few environment variables, and you're off! Compose it alongside paperless-ngx with minimal fuss.
Unified Web UI
Ad-hoc Document Analysis Perform ad-hoc analysis on a selection of documents using a custom prompt. Gain quick insights, summaries, or extract specific information from multiple documents at once.
v3.0.0-beta.rc1). paperless-gpt only uses the stable api/documents/, api/tags/, api/correspondents/, api/custom_fields/ and api/document_types/ endpoints, none of which have documented breaking changes in the v3 migration guide.gpt-4o or gpt-3.5-turbo.qwen3:8b.paperless-gpt has no built-in authentication. Its web UI and /api/* endpoints are open to anyone who can reach the port — by default it listens on all interfaces (LISTEN_INTERFACE defaults to :8080), so a plain -p 8080:8080 (as in the example below) exposes it to your whole LAN/VPN, not just localhost. Anyone who can reach it can rewrite documents in your connected paperless-ngx instance, trigger LLM/OCR jobs against your API keys, and change settings — with zero credentials required.
Do not expose it directly to the internet or an untrusted network. Put it behind a reverse proxy that adds authentication (e.g. Authelia, Authentik, a Basic Auth layer), restrict it to a VPN/Tailscale network, or otherwise limit who can reach the port.
Here's an example docker-compose.yml to spin up paperless-gpt alongside paperless-ngx:
…
Pro Tip: Replace placeholders with real values and read the logs if something looks off.
git clone https://github.com/icereed/paperless-gpt.git
cd paperless-gpt
prompts Directorymkdir prompts
docker build -t paperless-gpt .
docker run -d \
-e PAPERLESS_BASE_URL='http://your_paperless_ngx_url' \
-e PAPERLESS_API_TOKEN='your_paperless_api_token' \
-e LLM_PROVIDER='openai' \
-e LLM_MODEL='gpt-4o' \
-e OPENAI_API_KEY='your_openai_api_key' \
-e LLM_LANGUAGE='English' \
-e VISION_LLM_PROVIDER='ollama' \
-e VISION_LLM_MODEL='minicpm-v' \
-e LOG_LEVEL='info' \
-v $(pwd)/prompts:/app/prompts \
-p 8080:8080 \
paperless-gpt
For detailed provider-specific documentation:
paperless-gpt supports four different OCR providers, each with unique strengths and capabilities:
OCR_PROVIDER: "llm"
VISION_LLM_PROVIDER: "openai" # or "ollama"
VISION_LLM_MODEL: "gpt-4o" # or "minicpm-v"
OCR_PROVIDER: "azure"
AZURE_DOCAI_ENDPOINT: "https://your-endpoint.cognitiveservices.azure.com/"
AZURE_DOCAI_KEY: "your-key"
AZURE_DOCAI_MODEL_ID: "prebuilt-read" # optional
AZURE_DOCAI_TIMEOUT_SECONDS: "120" # optional
AZURE_DOCAI_OUTPUT_CONTENT_FORMAT:
"text" # optional, defaults to text, other valid option is 'markdown'
# 'markdown' requires the 'prebuilt-layout' model
OCR_PROVIDER: "google_docai"
GOOGLE_PROJECT_ID: "your-project"
GOOGLE_LOCATION: "us"
GOOGLE_PROCESSOR_ID: "processor-id"
CREATE_LOCAL_HOCR: "true" # Optional, for hOCR generation
LOCAL_HOCR_PATH: "/app/hocr" # Optional, default path
CREATE_LOCAL_PDF: "true" # Optional, for applying OCR to PDF
LOCAL_PDF_PATH: "/app/pdf" # Optional, default path
OCR_PROVIDER: "docling"
DOCLING_URL: "http://your-docling-server:port"
DOCLING_IMAGE_EXPORT_MODE: "placeholder" # Optional, defaults to "embedd
暂无开放 Issues,或尚未同步最近议题。