跳到正文

ChatGPT-Telegram-Workers

热门趋势活跃
tbxark/ChatGPT-Telegram-Workers

在 Cloudflare Workers 上简单快速地部署你自己的 ChatGPT Telegram 机器人。

在 GitHub 查看
星标
3809
Fork
892
关注
3809
未关闭 Issue
15

该介绍目前仅提供英文版本。

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

  1. Fork the Repository:

    git clone https://github.com/TBXark/ChatGPT-Telegram-Workers.git
  2. Deploy to Cloudflare Workers:

    • Create a new Cloudflare Workers project
    • Copy the worker code
    • Configure your environment variables
    • Deploy!
  3. 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

  1. Install dependencies:

    npm install
  2. 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.

按共同分类和标签排序的同类开源项目。