该介绍目前仅提供英文版本。
The simplest and fastest way to deploy your own ChatGPT Telegram bot. Use Cloudflare Workers, single file, copy and paste directly, no dependencies required, no need to configure local development environment, no domain name required, serverless.
Core Features
- Serverless Deployment: Deploy directly on Cloudflare Workers with zero configuration
- Multi-Platform Support: Works on Cloudflare Workers, Vercel, Docker, and more
- Multiple AI Providers: Supports OpenAI, Azure OpenAI, Cloudflare AI, Cohere, Anthropic, Mistral, DeepSeek, Gemini, Groq, and more
- Interactive Features:
- Model switching with inline keyboards
- Custom commands for quick model switching and bot presets
- Support for multiple Telegram bots
- Streaming output for real-time responses
- Advanced Features:
- Multi-language support
- Text-to-image generation
- Plugin system for custom extensions
- Customizable system initialization
Quick Start
-
Fork the Repository:
git clone https://github.com/TBXark/ChatGPT-Telegram-Workers.git -
Deploy to Cloudflare Workers:
- Create a new Cloudflare Workers project
- Copy the worker code
- Configure your environment variables
- Deploy!
-
Configure Your Bot:
- Get your Telegram bot token from @BotFather
- Set up your AI provider credentials
- Customize bot settings
Configuration
Environment Variables
TELEGRAM_BOT_TOKEN=your_bot_token
OPENAI_API_KEY=your_openai_key
Custom Commands
/start - Start the bot
/help - Show help information
/settings - Configure bot settings
/model - Switch AI models
Development
Requirements
- Node.js 16+
- Cloudflare account
- Telegram bot token
- AI provider API key
Local Development
-
Install dependencies:
npm install -
Start development server:
npm run dev
Deployment Options
Cloudflare Workers
- Zero configuration
- Serverless
- Global distribution
Vercel
- Easy deployment
- Automatic HTTPS
- Custom domains
Docker
- Containerized deployment
- Easy scaling
- Environment isolation
Support
Contributing
Contributions are welcome! Please read our Contributing Guide for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.