Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocPilot AI - Telegram AI Document Assistant

5965DA80-8738-41DF-9316-0DB2A02F13E9

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.

Overview

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.

Tech Stack

  • Python
  • Telegram Bot API
  • Ollama
  • Qwen2.5
  • SQLite
  • pdfplumber
  • Tesseract OCR
  • pdf2image
  • Poppler

Features

  • 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

Workflow

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

Screenshots

Start

start

OCR Processing

ocr

Summary Result

suumary

Future Improvements

  • FastAPI Web API
  • PostgreSQL
  • User Authentication
  • Web Dashboard
  • Background Workers
  • Multi-language Support

License

MIT License

About

Telegram AI assistant for PDF OCR, local AI summarization, and document tracking using Ollama and SQLite.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages