ChatGPT-Telegram-Bot  by V-know

Telegram bot for conversational AI

created 2 years ago
638 stars

Top 52.9% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a feature-rich Telegram bot for interacting with AI models, specifically OpenAI and Azure OpenAI. It targets users seeking a customizable and smooth AI chat experience within Telegram, offering features like real-time streaming, DALL-E 3 image generation, and user-level access controls.

How It Works

The bot leverages the Telegram Bot API for user interaction and integrates with OpenAI's API for AI capabilities. It supports real-time (streaming) responses for a more fluid user experience. The architecture includes a database for managing user levels, chat history, and bot configurations, with support for MySQL. It also allows for custom bot identities and presets, enhancing personalization.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Database setup: Local MySQL via docker-compose up -d -f db/docker-compose.yaml, then initialize with mysql -uusername -p -e "source db/database.sql".
  • Configuration: Edit config.yaml with BOT_TOKEN, DEVELOPER_CHAT_ID, and AI-specific parameters.
  • Run: python main.py or use Docker: docker run --rm --name chatgpt-telegram-bot -v ./config.yaml:/app/config.yaml ghcr.io/v-know/chatgpt-telegram-bot:latest.
  • Prerequisites: Python, MySQL, Telegram Bot Token.

Highlighted Details

  • Supports both OpenAI and Azure OpenAI.
  • Real-time (streaming) AI responses.
  • DALL-E 3 image generation.
  • 15 preset and custom bot identities.
  • User-level division for access control (token limits, context count, frequency).
  • UI supports English and Chinese.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack) are mentioned in the README.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is marked with TODO items indicating planned features like allowing users to use their own OpenAI keys and improving error handling. The lack of an explicit license may pose a barrier to commercial adoption.

Health Check
Last commit

1 week ago

Responsiveness

1+ week

Pull Requests (30d)
2
Issues (30d)
0
Star History
20 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.