tbxark/ChatGPT-Telegram-Workers

Easily deploy your Telegram ChatGPT bot on Cloudflare Workers (or Vercel, Docker...).

ChatGPT‑Telegram‑Workers

What it is – A ready‑to‑run Telegram bot that forwards messages to a large‑language‑model service (OpenAI, Anthropic, Mistral, etc.) and returns the model’s replies. The whole bot lives in a single JavaScript/TypeScript file and runs on Cloudflare Workers (or other serverless platforms) so you don’t need to manage a server or install dependencies.

Key capabilities

  • Server‑less deployment – Deploy with one click to Cloudflare Workers, Vercel, Docker, or run locally. No domain name or VM required.
  • Multi‑provider support – Works with OpenAI, Cloudflare AI, Cohere, Anthropic, Mistral, DeepSeek, Groq and others, selectable via a simple KV‑based config.
  • Web admin panel – A Telegram Mini‑App lets you edit AI provider settings, switch models, and manage presets without touching code.
  • Custom commands – Define shortcuts for model switching, preset selection, or any other bot behaviour.
  • Streaming responses – Sends partial replies as they are generated, giving a more chat‑like experience.
  • Text‑to‑image – Forward a prompt to a supported provider and receive generated images.
  • Plugin system – Hook in custom logic (e.g., moderation, logging, extra APIs) through a documented plugin interface.
  • Multi‑language UI – Bot messages and admin UI are localized.

How you get it running

  1. Click the Deploy to Cloudflare button in the README. Cloudflare clones the repo, creates a KV namespace, asks for your Telegram bot token, and publishes the worker.
  2. Alternatively, follow the docs to deploy on Vercel, Docker, or run locally.
  3. Configure the KV store (or environment variables) with your chosen AI provider’s API key and any custom settings.
  4. Start chatting with the bot on Telegram; use the admin Mini‑App to tweak settings on the fly.

Why it matters – It lowers the barrier for anyone who wants a personal ChatGPT‑style assistant on Telegram. By leveraging serverless platforms, the bot is cheap to run, scales automatically, and requires virtually no DevOps knowledge.

License – MIT, so you can freely modify or embed the bot in other projects.

Related

  • Project
  • Project
  • Project