Skip to content

Conversation

@amarabass3435
Copy link

What was added

  • Added optional support for running Telegram’s Local Bot API server (telegram-bot-api in --local mode) alongside Pentaract via Docker Compose.
  • Added disk-backed streaming for uploads and downloads so large files don’t need to be buffered fully in RAM.
  • Added configurable chunk sizing (up to ~2GB per chunk when Local Bot API is enabled) to support very large files by splitting them into Telegram document chunks.

Why

  • The official Telegram Bot API has practical size limits that make large uploads/downloads unreliable.
  • Local Bot API allows much larger payloads, and streaming avoids high memory usage during transfers.

How to use

  1. Create/adjust your .env:
  • TELEGRAM_LOCAL_API=true
  • TELEGRAM_API_BASE_URL=http://telegram-bot-api:8081
  • TELEGRAM_API_ID=... and TELEGRAM_API_HASH=... (Telegram app credentials. Create one here)
  • TELEGRAM_CHUNK_SIZE_MB=1950 (safe default under the ~2GB limit)
  • WORK_DIR=/work
  1. Start everything:
  • docker compose up -d --build
  1. Upload/download normally through the API/UI:
  • Files are automatically chunked (if needed) and streamed during upload/download.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants