A Telegram bot that receives PDF files, extracts text using PDF parsing or OCR, cleans the extracted text, summarizes it with a local AI model using Ollama, and sends the result back to the user.
DocPilot AI is a local-first Telegram assistant that can process PDF documents, automatically detect when OCR is required, extract readable text, generate AI-powered summaries using Ollama, and keep track of processed documents with SQLite.
- Python
- Telegram Bot API
- Ollama
- Qwen2.5
- SQLite
- pdfplumber
- Tesseract OCR
- pdf2image
- Poppler
- Telegram Bot integration
- PDF upload support
- PDF text extraction with pdfplumber
- OCR support with Tesseract
- Persian + English OCR
- Text cleaning
- Chunk-based summarization
- Local AI summarization with Ollama
- SQLite database tracking
- Document status tracking
- Saves extracted text and summaries
- Automatic OCR detection
- Local-first AI processing
- Smart PDF/OCR fallback
Telegram User
↓
Send PDF
↓
Download File
↓
Save Document in SQLite
↓
Extract Text with pdfplumber
↓
Fallback to OCR if needed
↓
Clean Text
↓
Split into Chunks
↓
Summarize with Ollama
↓
Save Summary
↓
Send Summary to Telegram
- FastAPI Web API
- PostgreSQL
- User Authentication
- Web Dashboard
- Background Workers
- Multi-language Support
MIT License