Telegram group bot that stores chat history and summarizes recent topics with Kimi K2.6 Tu https://t.me/chad_summary_bot
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nikita Kolmogorov 4af489bcc9
Upgrade Bun to 1.4.4 (Oct 2026 security fixes) (#5)
Nixpacks gets Bun from nixpkgs, which only has 1.3.13 at our pin, so the setup phase points nixpkgs' bun package at the official 1.4.4 release zip (hash pinned). Remove the override once nixpkgs has bun >= 1.4.4.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:02:52 -07:00
.github Add funding links 2026-10-08 15:24:48 -07:00
assets Add Chad Summary Bot profile image 2026-05-29 09:53:54 -07:00
src Block reasoning leakage from summaries (#3) 2026-09-13 10:17:22 -07:00
tests Block reasoning leakage from summaries (#3) 2026-09-13 10:17:22 -07:00
.env.example Fix empty summaries with free model routing (#1) 2026-09-03 15:24:30 -07:00
.gitignore Initial Telegram chat summarizer bot 2026-05-29 09:42:48 -07:00
bun.lockb Initial Telegram chat summarizer bot 2026-05-29 09:42:48 -07:00
nixpacks.toml Upgrade Bun to 1.4.4 (Oct 2026 security fixes) (#5) 2026-10-22 10:02:52 -07:00
package.json Fix empty summaries with free model routing (#1) 2026-09-03 15:24:30 -07:00
README.md Fix empty summaries with free model routing (#1) 2026-09-03 15:24:30 -07:00
tsconfig.json Initial Telegram chat summarizer bot 2026-05-29 09:42:48 -07:00

Telegram Chat Summarizer

Telegram group bot that stores incoming group messages in a local SQLite database and lets anyone in the group ask a configured OpenAI-compatible LLM for a summary of recent topics.

Bot: @chad_summary_bot

What It Does

  • Stores incoming text, captions, and basic media placeholders separately per Telegram group.
  • Lets any group member run /summary for the last 24 hours, or pass a window like /summary 7d or /summary 100.
  • Uses the configured LLM endpoint for concise summaries.
  • Streams summaries by editing a plain-text placeholder message.
  • Keeps secrets in environment variables, not in git.

Important Telegram limitation: bots can only store messages they receive after being added. The bot needs permission to receive normal group messages.

Telegram Setup

  1. Create or configure the Telegram bot.
  2. Allow it to receive normal group messages.
  3. Add the bot to a group.
  4. Send /start or /help in the group.
  5. After some chat happens, run /summary.

Environment

Copy .env.example to .env locally, or set these variables in Easypanel:

  • TELEGRAM_BOT_TOKEN
  • LLM_API_KEY
  • LLM_BASE_URL
  • LLM_MODEL
  • DATABASE_PATH
  • SUMMARY_DEFAULT_MESSAGES
  • SUMMARY_MAX_MESSAGES
  • AI_TEMPERATURE
  • AI_MAX_TOKENS
  • DISABLE_REASONING (defaults to true; asks OpenRouter to use low reasoning effort and exclude reasoning tokens, while legacy endpoints receive their native disable-thinking flag. Set to false to use the selected model's default reasoning behavior.)

Use a persistent volume for DATABASE_PATH, for example /app/data/chat-summaries.sqlite.

Deployment

Use Nixpacks on Hetzner Easypanel. Set the env vars above in Easypanel and mount a persistent data volume at /app/data.

Development

bun install
bun test
bun run typecheck
bun run start