PrivateGPT: 100% Private Document AI
PrivateGPT lets you chat with your documents using local LLMs. No data leaves your machine. PDF, DOCX, TXT, CSV — ingest, embed, query. All offline, all private.
Why PrivateGPT
- 100% offline — no internet needed after setup
- Local LLMs — Mistral, Llama, etc. via Ollama
- Document ingestion — PDF, DOCX, TXT, CSV, code
- RAG built-in — automatic chunking + embeddings
- OpenAI-compatible API
The Free API
# Ingest documents
curl -X POST http://localhost:8001/v1/ingest/file \
-F "file=@contract.pdf"
# Chat with documents
curl -X POST http://localhost:8001/v1/chat/completions \
-H "Content-Type: application/json" \
-d "{\"messages\": [{\"role\": \"user\", \"content\": \"What are the payment terms?\"}], \"use_context\": true, \"stream\": false}"
# List ingested documents
curl http://localhost:8001/v1/ingest/list
# Delete a document
curl -X DELETE http://localhost:8001/v1/ingest/doc-id-here
# Chat without context (just LLM)
curl -X POST http://localhost:8001/v1/chat/completions \
-d "{\"messages\": [{\"role\": \"user\", \"content\": \"What is GDPR?\"}], \"use_context\": false}"
Supported Formats
PDF, DOCX, TXT, MD, CSV, JSON, HTML, EPUB, Python, JavaScript, TypeScript, Java, Go, and more.
Real-World Use Case
A law firm needed AI document analysis but GDPR prohibited sending client data to any cloud service. PrivateGPT on a local workstation: lawyers upload contracts, ask questions about terms and obligations. 100% compliant, zero cloud dependency.
Quick Start
git clone https://github.com/zylon-ai/private-gpt
cd private-gpt
poetry install --extras "ui llms-ollama embeddings-ollama vector-stores-qdrant"
OLLAMA_BASE_URL=http://localhost:11434 python -m private_gpt
# UI at http://localhost:8001
Resources
Need private data pipelines? Check out my tools on Apify or email spinov001@gmail.com for custom solutions.
Top comments (0)