cf-ai-TGbot  by Johnsheng1

AI Telegram bot for context-aware LLM conversations

Created 1 year ago
370 stars

Top 76.1% on SourcePulse

GitHubView on GitHub
Project Summary

A customizable Telegram bot powered by Node.js, integrating Cloudflare AI Gateway to provide smart, context-aware conversations. It targets users seeking a flexible and easily deployable AI chatbot for Telegram groups and private chats, offering features like persistent memory and rich message formatting.

How It Works

This project leverages Node.js to create a Telegram bot that routes all AI requests through Cloudflare AI Gateway. This approach centralizes logging, analysis, and caching while protecting backend AI provider API keys. The bot maintains contextual conversation memory, allowing for fluid, multi-turn dialogues with a controllable memory length. It automatically converts AI-generated Markdown into Telegram-compatible HTML, ensuring code blocks, bold, and italic text are displayed correctly.

Quick Start & Requirements

  • Primary Install/Run: Deploy on a VPS using Node.js and PM2 for persistent, auto-restarting operation.
  • Prerequisites:
    • Telegram Bot Token (from @BotFather).
    • Cloudflare Account Credentials: Account ID, AI Gateway Name, API Token (with AI Gateway read/write permissions).
    • VPS (Ubuntu/Debian recommended) with Node.js v18+ (installable via nvm) and Git.
    • PM2 process manager (npm install pm2 -g).
  • Links:

Highlighted Details

  • Cloudflare AI Gateway integration for enhanced control, logging, and security.
  • Per-chat customization for distinct personas, AI models, and keyword triggers.
  • Intelligent context memory management with adjustable message limits.
  • Automatic Markdown-to-HTML conversion for rich message formatting in Telegram.
  • Multiple activation triggers: @mention, message reply, or specific keywords.

Maintenance & Community

No specific details regarding maintainers, community channels (like Discord/Slack), or a public roadmap were found in the provided README.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: The MIT license permits commercial use and integration within closed-source projects.

Limitations & Caveats

Setup requires specific Cloudflare account configurations and API tokens. The bot's performance and operational costs are dependent on Cloudflare usage, the selected LLMs, and the configured context message limit.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Wei-Lin Chiang Wei-Lin Chiang(Cofounder of LMArena), and
13 more.

awesome-tensor-compilers by merrymercy

0%
3k
Curated list of tensor compiler projects and papers
Created 6 years ago
Updated 1 year ago
Starred by Shengjia Zhao Shengjia Zhao(Chief Scientist at Meta Superintelligence Lab), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
14 more.

BIG-bench by google

0%
3k
Collaborative benchmark for probing and extrapolating LLM capabilities
Created 5 years ago
Updated 2 years ago
Starred by Lysandre Debut Lysandre Debut(Chief Open-Source Officer at Hugging Face), Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), and
14 more.

simpletransformers by ThilinaRajapakse

0%
4k
Rapid NLP task implementation
Created 6 years ago
Updated 2 months ago
Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
16 more.

text-to-text-transfer-transformer by google-research

0%
7k
Unified text-to-text transformer for NLP research
Created 6 years ago
Updated 1 month ago
Starred by Vaibhav Nivargi Vaibhav Nivargi(Cofounder of Moveworks), Chuan Li Chuan Li(Chief Scientific Officer at Lambda), and
5 more.

awesome-mlops by visenger

0%
14k
Curated MLOps knowledge hub
Created 6 years ago
Updated 1 year ago
Feedback? Help us improve.