tg_bot_collections  by yihong0618

Telegram bot for interacting with various AI models

created 1 year ago
575 stars

Top 56.9% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a collection of Telegram bots designed for various AI-powered tasks, including text generation, image creation, and chat interactions. It targets users who want to integrate advanced AI models like Gemini, Claude 3, ChatGPT, and others directly into their Telegram conversations. The primary benefit is the ability to leverage multiple large language models and generative AI services through a single, unified Telegram interface.

How It Works

The project acts as a Telegram bot framework, allowing users to interact with different AI models by sending specific commands and text prompts. Each bot functionality is implemented as a separate module, triggered by commands like /gemini, /claude, or gpt:. It supports API key authentication for various third-party AI services, enabling users to connect their existing accounts. The architecture is modular, allowing for the addition of new AI models and features.

Quick Start & Requirements

  • Install: pip install -r requirements.txt
  • Prerequisites: Python 3, Telegram Bot Token, API keys for desired AI services (e.g., Google Gemini, Anthropic Claude, OpenAI ChatGPT).
  • Run: python tg.py <telegram_bot_token>
  • Docker: Build image with docker build -t tg_bot_collections . and run with specific environment variables for AI API keys and the Telegram bot token.

Highlighted Details

  • Supports multiple LLMs: Gemini, Claude 3, ChatGPT, Llama 3, Qwen, Cohere, Dify, and Kling.
  • Image generation capabilities via Kling bot.
  • Text-to-speech functionality using ChatTTS.
  • Telegraph integration for creating and managing posts.
  • Modular design for easy extension with new AI models.

Maintenance & Community

The repository is maintained by yihong0618. Contributions are welcome via pull requests, with a recommendation to use black for code formatting.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README. Users should verify licensing for commercial use and compatibility with closed-source projects.

Limitations & Caveats

The README mentions a potential risk of breaking system configuration when running as a shell script, referencing an issue for details. Some functionalities, like Telegraph posting, may have limitations if tokens are not stored properly.

Health Check
Last commit

2 weeks ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.