GPT-Telegram-Worker

A multi-model AI Telegram bot powered by Cloudflare Workers, supporting various APIs including OpenAI, Claude, and Azure. Developed in TypeScript with a modular design for easy expansion.基于 Cloudflare Workers 的多模型 AI Telegram 机器人,支持 OpenAI、Claude、Azure 等多个 API,采用 TypeScript 开发,模块化设计便于扩展。

Stars
110
GPT-Telegram-Worker - Latest Release

Published by snakeying 11 days ago

🎉 重要更新

  • 🔗 新增 OpenAI Compatible 模型支持
    • 专为 One API、New API 等 AI 模型接口管理与分发系统设计
    • 新增环境变量:
      • OPENAI_COMPATIBLE_KEY:OpenAI Compatible API 密钥
      • OPENAI_COMPATIBLE_URL:OpenAI Compatible API 基础 URL
  • 🤖 优化 OpenAI Compatible 模型使用体验
    • 支持自动获取模型列表,无需手动在环境变量中配置
    • 现有的 /switchmodel 命令可直接调用这些自动获取的模型
  • 🖼️ 扩展图片分析能力
    • OpenAI Compatible 模型现已支持图片分析
    • 支持多模态 OpenAI 模型和 Gemini 系列
  • 🐞 系统维护
    • 修复已知问题,提升系统稳定性

⚠️ 重要提示:为避免潜在冲突,不建议在 OpenAI Compatible 中添加与其他 API 重复的模型。例如,如果您已设置 Gemini API 并选择调用 gemini-1.5-flash 模型,则不应在 OpenAI Compatible 中添加相同的模型。

🎉 Important Update

  • 🔗 Added Support for OpenAI Compatible Models
    • Specially designed for AI model interface management and distribution systems like One API and New API
    • New environment variables:
      • OPENAI_COMPATIBLE_KEY: OpenAI Compatible API key
      • OPENAI_COMPATIBLE_URL: OpenAI Compatible API base URL
  • 🤖 Enhanced OpenAI Compatible Model Usage
    • Automatic model list retrieval, eliminating manual configuration in environment variables
    • Existing /switchmodel command now directly supports these automatically retrieved models
  • 🖼️ Expanded Image Analysis Capabilities
    • OpenAI Compatible models now support image analysis
    • Compatible with multimodal OpenAI models and Gemini series
  • 🐞 System Maintenance
    • Fixed known issues to improve system stability

⚠️ Important Note: To avoid potential conflicts, it is not recommended to add models in OpenAI Compatible that are identical to those in other APIs. For example, if you have set up the Gemini API and chosen to use the gemini-1.5-flash model, you should not add the same model in OpenAI Compatible.

GPT-Telegram-Worker -

Published by snakeying 16 days ago

🔧 系统更新

  • 🖼️ 图片分析功能优化
    • 为OpenAI和Gemini分别定制了响应接口
    • 提高了不同AI模型的图像处理效率和准确性
  • 🐞 系统维护
    • 修复已知问题,提升整体稳定性

🔧 System Update

  • 🖼️ Image Analysis Enhancement
    • Implemented customized response interfaces for OpenAI and Gemini
    • Improved efficiency and accuracy of image processing across different AI models
  • 🐞 System Maintenance
    • Fixed known issues, enhancing overall stability
GPT-Telegram-Worker -

Published by snakeying 16 days ago

🎉 重要更新

  • 🖼️ 新增图片分析功能
    • 支持Gemini系列模型进行图像识别和分析
    • 兼容OpenAI和Gemini系列,为用户提供多样化选择
  • 🌐 优化国际化体验
    • 修正了i18n中的翻译错误,提升多语言支持质量
  • 📚 增强帮助文档
    • 在help命令中新增图片分析功能说明,方便用户快速上手
  • 🐞 系统维护
    • 修复已知问题,确保更稳定的运行环境

🎉 Important Update

  • 🖼️ New Image Analysis Feature
    • Introduced image recognition and analysis for Gemini series models
    • Compatible with both OpenAI and Gemini series, offering users diverse options
  • 🌐 Enhanced Internationalization
    • Corrected translation errors in i18n, improving multi-language support quality
  • 📚 Expanded Help Documentation
    • Added image analysis feature explanation to the help command for easy user adoption
  • 🐞 System Maintenance
    • Fixed known issues, ensuring a more stable operating environment
GPT-Telegram-Worker -

Published by snakeying 16 days ago

🔄 系统更新

  • 🖥️ 优化Gemini系列的输出处理
    • 改进了markdown支持,减少了错误发生率
    • 引入HTML优先输出策略,提升内容可读性
    • 添加纯文本备选方案,确保内容始终可访问
  • 🐞 修复已知问题,提高系统稳定性

🔄 System Update

  • 🖥️ Optimized output handling for Gemini series
    • Improved markdown support, reducing error occurrences
    • Introduced HTML-first output strategy for better readability
    • Added plain text fallback to ensure content accessibility
  • 🐞 Fixed known issues, enhancing system stability
GPT-Telegram-Worker -

Published by snakeying 16 days ago

🚀 全新图片分析功能上线

  • 🖼️ 智能图片分析:
    • 轻松发送图片,添加"请分析这张图片"等提示
    • 机器人自动调用 AI 模型,深度解读图片内容
  • 🤖 多模型支持:
    • 暂时只支持 OpenAI系列
  • 📊 便捷结果呈现:
    • 分析结果以文本消息形式快速返回
  • 🛠️ 系统优化:
    • 修复已知 bug,确保稳定运行
    • 持续改进,为用户带来更流畅体验

🚀 New Image Analysis Feature Launched

  • 🖼️ Intelligent Image Analysis:
    • Easily send images with prompts like "Please analyze this image"
    • Bot automatically invokes AI models for in-depth image interpretation
  • 🤖 Multi-model Support:
    • Currently supports OpenAI series only
  • 📊 Convenient Result Presentation:
    • Analysis results quickly returned as text messages
  • 🛠️ System Optimization:
    • Fixed known bugs to ensure stable operation
    • Continuous improvements for a smoother user experience
GPT-Telegram-Worker -

Published by snakeying 17 days ago

🎉 1.0 正式发布

• 🌏 新增五种语言支持:

  • 繁体中文:為台灣和港澳用戶提供更貼心的服務
  • 日本語:日本のユーザーに最適化されたエクスペリエンス
  • Deutsch:Optimiert für deutschsprachige Nutzer
  • Français:Une expérience adaptée aux utilisateurs francophones
  • Русский:Оптимизировано для русскоговорящих пользователей
    • 🚀 正式迈入 1.0 版本:
    • 🌈 8种多语言支持
    • 🐞 全面修复已知 bug:
  • 提升系统稳定性和可靠性
  • 优化用户体验,确保流畅运行

🎉 1.0 Official Release

• 🌏 Added support for five new languages:

  • Traditional Chinese: Tailored service for Taiwan, Hong Kong, and Macau users
  • Japanese: Optimized experience for Japanese users
  • German: Enhanced support for German-speaking users
  • French: Adapted experience for Francophone users
  • Russian: Optimized for Russian-speaking users
    • 🚀 Officially entering version 1.0
    • 🌈 Multicultural integration,8 languages supported
    • 🐞 Comprehensive fixes for known bugs:
  • Enhanced system stability and reliability
  • Optimized user experience ensuring smooth operation
GPT-Telegram-Worker -

Published by snakeying 18 days ago

🚀 引入便捷「M」菜单,多语言支持全面优化!

• 📱 全新「M」菜单按钮:

  • 在创建 Telegram Bot 时自动添加,让操作更直观、便捷
    • 🌍 菜单多语言支持:
  • 使用 /language 命令设置语言后,菜单自动适配所选语言
  • 轻松切换,贴心满足全球用户需求
    • 🔧 用户体验升级:
  • 简化操作流程,提高交互效率
  • 个性化语言设置,让使用更加顺心
    • 🐞 修复已知 bug,确保系统运行更加稳定流畅

🚀 Introducing the Handy "M" Menu with Enhanced Multilingual Support!

• 📱 New "M" menu button:

  • Automatically added when creating Telegram Bots for more intuitive and convenient operation
    • 🌍 Multilingual menu support:
  • Menu automatically adapts to the chosen language after using the /language command
  • Easy switching to cater to global users' needs
    • 🔧 User experience enhancement:
  • Simplified operation process for improved interaction efficiency
  • Personalized language settings for a more comfortable user experience
    • 🐞 Fixed known bugs, ensuring more stable and smooth system operation
GPT-Telegram-Worker -

Published by snakeying 18 days ago

🚀引入 Azure AI 模型支持

• ☁️ 全新集成 Azure AI 模型功能:

  • 为您的 AI 工具箱增添微软云端智能的强大力量
    • 🔑 新增三个环境变量,简化 Azure 配置:
  • AZURE_API_KEY:存储 Azure API 密钥
  • AZURE_MODELS:指定所需使用的 Azure 模型(支持多个,用逗号分隔)
  • AZURE_ENDPOINT:设置 Azure API 的特定端点
    • 🌐 云端融合:无缝对接 Azure 云服务,拓展 AI 应用场景
    • 🔧 灵活部署:通过自定义端点,适应不同的 Azure 部署需求
    • 🐞 修复已知 bug,确保系统运行更加流畅可靠

🚀 Introducing Azure AI Model Support

• ☁️ New integration with Azure AI models:

  • Add the power of Microsoft's cloud intelligence to your AI toolkit
    • 🔑 Added three new environment variables for streamlined Azure setup:
  • AZURE_API_KEY: Store Azure API key
  • AZURE_MODELS: Specify desired Azure models (supports multiple, comma-separated)
  • AZURE_ENDPOINT: Set specific Azure API endpoint
    • 🌐 Cloud integration: Seamlessly connect with Azure cloud services, expanding AI application scenarios
    • 🔧 Flexible deployment: Adapt to various Azure deployment needs with custom endpoints
    • 🐞 Fixed known bugs, ensuring smoother and more reliable system operation
GPT-Telegram-Worker -

Published by snakeying 18 days ago

🚀 引入 Claude AI 支持

• 🧠 全新集成 Claude AI 功能:

  • 为您的 AI 体验注入 Anthropic 的先进技术
    • 🔑 新增三个环境变量,轻松配置 Claude:
  • CLAUDE_API_KEY:存储 Claude 的 API 密钥
  • CLAUDE_MODELS:指定所需使用的 Claude 模型(支持多个,用逗号分隔)
  • CLAUDE_ENDPOINT:自定义 Claude API 端点 URL(默认为 Anthropic 官方端点)
    • 🌈 更多选择:扩充您的 AI 助手阵容,满足多样化需求
    • 🔧 灵活定制:通过自定义端点,适应不同的部署场景
    • 🐞 修复已知 bug,提升系统整体稳定性和性能

🚀 Introducing Claude AI Support

• 🧠 New integration with Claude AI:

  • Infuse your AI experience with Anthropic's advanced technology
    • 🔑 Added three new environment variables for easy Claude setup:
  • CLAUDE_API_KEY: Store Claude's API key
  • CLAUDE_MODELS: Specify desired Claude models (supports multiple, comma-separated)
  • CLAUDE_ENDPOINT: Customize Claude API endpoint URL (default set to Anthropic's official endpoint)
    • 🌈 More options: Expand your AI assistant lineup to meet diverse needs
    • 🔧 Flexible customization: Adapt to various deployment scenarios with custom endpoints
    • 🐞 Fixed known bugs, enhancing overall system stability and performance
GPT-Telegram-Worker -

Published by snakeying 18 days ago

🚀 整合 Groq API,体验更快速的 AI!

• 🔌 全新集成 Groq API 调用功能:

  • 为您带来更快速、更高效的 AI 体验
    • 🔑 新增两个环境变量,轻松配置 Groq:
  • GROQ_API_KEY:用于 Groq API 认证的密钥
  • GROQ_MODELS:支持多个 Groq 模型(以逗号分隔)
    • 🌈 更多选择:扩展您的 AI 模型库,满足不同需求
    • 🚀 性能提升:借助 Groq 的高速处理能力,获得更快的响应
    • 🐞 修复已知 bug,确保系统运行更加流畅稳定

🚀 Integrating Groq API for Lightning-Fast AI!

• 🔌 New integration with Groq API:

  • Experience faster and more efficient AI processing
    • 🔑 Added two new environment variables for easy Groq setup:
  • GROQ_API_KEY: Key for Groq API authentication
  • GROQ_MODELS: Support for multiple Groq models (comma-separated)
    • 🌈 More options: Expand your AI model library to meet various needs
    • 🚀 Performance boost: Leverage Groq's high-speed processing for quicker responses
    • 🐞 Fixed known bugs, ensuring smoother and more stable system operation
GPT-Telegram-Worker -

Published by snakeying 18 days ago

🚀 引入 Google Gemini 模型支持!

• 🧠 新增 Google Gemini 系列模型调用功能:

  • 为您的 AI 体验增添更多选择
    • 🔑 新增三个环境变量,轻松配置 Gemini:
  • GOOGLE_MODEL_KEY:Google AI Studio API 密钥
  • GOOGLE_MODEL_BASEURL:Gemini API 基础地址(默认为 https://generativelanguage.googleapis.com/v1beta)
  • GOOGLE_MODELS:Gemini 模型名称(支持多个,用逗号分隔)
    • ℹ️ 使用须知:
  • 为确保与 Telegram 格式兼容,Gemini 暂不支持流式输出
  • Gemini 模型目前不支持系统消息(system message)功能
    • 🐞 修复已知 bug,提升整体稳定性

🚀 Introducing Google Gemini Model Support!

• 🧠 Added support for Google Gemini model series:

  • Expanding your AI experience with more options
    • 🔑 Introduced three new environment variables for easy Gemini configuration:
  • GOOGLE_MODEL_KEY: Google AI Studio API key
  • GOOGLE_MODEL_BASEURL: Gemini API base URL (default: https://generativelanguage.googleapis.com/v1beta)
  • GOOGLE_MODELS: Gemini model names (supports multiple, comma-separated)
    • ℹ️ Important notes:
  • To ensure compatibility with Telegram format, Gemini doesn't support streaming output
  • Gemini models currently don't support system messages
    • 🐞 Fixed known bugs, improving overall stability
GPT-Telegram-Worker -

Published by snakeying 19 days ago

🚀 Flux功能大升级:引入智能提示优化!

• 🔧 新增四个可选环境变量,让您的体验更加个性化:

  • PROMPT_OPTIMIZATION:开启智能优化("true"或"false")
  • EXTERNAL_API_BASE:外部API基础地址
  • EXTERNAL_MODEL:外部模型选择
  • EXTERNAL_API_KEY:外部API密钥
    • 🧠 智能提示优化流程:
  • 当PROMPT_OPTIMIZATION为"true"时,自动调用外部API优化您的Flux提示
  • 使用优化后的提示调用Flux API,提升生成质量
    • 🔒 安全可靠:外部API的系统提示采用固定硬编码,不受SYSTEM_INIT_MESSAGE影响
    • 🔄 灵活选择:未开启优化?别担心,机器人会直接使用您的原始提示
    • 🐞 修复已知bug,确保功能稳定运行

🚀 Major Flux Upgrade: Introducing Smart Prompt Optimization!

• 🔧 Added four new optional environment variables for a more personalized experience:

  • PROMPT_OPTIMIZATION: Enable smart optimization ("true" or "false")
  • EXTERNAL_API_BASE: External API base address
  • EXTERNAL_MODEL: External model selection
  • EXTERNAL_API_KEY: External API key
    • 🧠 Smart prompt optimization process:
  • When PROMPT_OPTIMIZATION is "true", automatically calls external API to optimize your Flux prompt
  • Uses the optimized prompt to call Flux API, enhancing generation quality
    • 🔒 Secure and reliable: System prompt for external API uses fixed hardcoding, unaffected by SYSTEM_INIT_MESSAGE
    • 🔄 Flexible choice: Optimization not enabled? No worries, bot'll use your original prompt directly
    • 🐞 Fixed known bugs, ensuring stable feature performance
GPT-Telegram-Worker -

Published by snakeying 19 days ago

📊 Flux功能再升级:更智能,更便捷!

• 🖼️ 优化 /flux 命令,提供更友好的用户体验

  • 未指定比例?别担心,默认为您选择1:1方图
  • 轻松创作,无需记忆复杂参数
    • 🐞 修复已知bug,确保功能稳定可靠
  • 为您带来更流畅、无忧的创作体验

📊 Flux Feature Enhanced: Smarter and More Convenient!

• 🖼️ Optimized /flux command for a more user-friendly experience

  • Didn't specify an aspect ratio? No worries, default to a 1:1 square for you
  • Create with ease, no need to memorize complex parameters
    • 🐞 Fixed known bugs, ensuring stable and reliable functionality
  • Bringing you a smoother, worry-free creative experience
GPT-Telegram-Worker -

Published by snakeying 19 days ago

🎨 Flux图像生成功能全面升级!

• 📐 新增多种预设尺寸和宽高比选项:

  • 1:1 (1024x1024) - 完美方形
  • 1:2 (512x1024) - 纵向长图
  • 3:2 (768x512) - 经典照片比例
  • 3:4 (768x1024) - 竖屏优选
  • 16:9 (1024x576) - 宽屏视觉盛宴
  • 9:16 (576x1024) - 移动设备首选
    • 🔧 优化 /flux 命令,操作更简便
  • 轻松选择理想尺寸,释放创意无限可能

🎨 Flux Image Generation Feature Fully Enhanced!

• 📐 Introduced multiple preset sizes and aspect ratios:

  • 1:1 (1024x1024) - Perfect square
  • 1:2 (512x1024) - Vertical long image
  • 3:2 (768x512) - Classic photo ratio
  • 3:4 (768x1024) - Portrait mode favorite
  • 16:9 (1024x576) - Widescreen visual feast
  • 9:16 (576x1024) - Mobile device optimized
    • 🔧 Refined /flux command for easier operation
  • Effortlessly choose your ideal size, unleash limitless creative possibilities
GPT-Telegram-Worker -

Published by snakeying 19 days ago

🌈 全新功能:Cloudflare Flux 图像生成来袭!

• 🖼️ 新增 /flux 命令,开启AI艺术创作新篇章
• ☁️ 成功集成 Cloudflare Flux API,拓展图像生成能力
• 🔑 引入新环境变量,轻松配置您的Flux体验:

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID
  • FLUX_STEPS(默认值:4)
    • 🎲 添加随机种子机制,每次生成独一无二的图像
    • 🐞 修复已知bug,确保功能稳定运行

🌈 New Feature: Cloudflare Flux Image Generation is Here!

• 🖼️ Introduced /flux command, opening a new chapter in AI art creation
• ☁️ Successfully integrated Cloudflare Flux API, expanding image generation capabilities
• 🔑 New environment variables for easy Flux experience configuration:

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID
  • FLUX_STEPS (default value: 4)
    • 🎲 Added random seed mechanism, ensuring unique image generation every time
    • 🐞 Fixed known bugs for stable feature performance
GPT-Telegram-Worker -

Published by snakeying 27 days ago

🖼️ 图像生成功能优化:更精准,更智能!

• 🔧 修复 /image 命令的分辨率调用问题

  • 现在可以准确生成您指定尺寸的图片啦
    • 💡 新增智能分辨率提示功能
  • 输入不支持的尺寸?别担心,机器人会为您推荐合适的选项

🖼️ Image Generation Feature Refined: More Precise, More Intelligent!

• 🔧 Fixed resolution issue in /image command

  • Now accurately generates images in your specified dimensions
    • 💡 Introduced smart resolution suggestions
  • Entered an unsupported size? No worries, bot'll recommend suitable options
GPT-Telegram-Worker -

Published by snakeying 27 days ago

🎨 重磅更新:DALL·E 图像生成功能来袭!

• 🖼️ 新增 /img 命令,释放您的创意想象力

  • 格式:"/img 描述 图片大小"
  • 默认生成 1024x1024 尺寸图片
    • 🎛️ 引入 DALL_E_MODEL 环境变量,默认启用 DALL·E 3
    • 📐 智能分辨率提示:输入不支持的尺寸时,系统贴心推荐可用选项
    • 📚 /help 命令现已包含 /img 使用说明

注意:DALL·E 功能仅在配置 OpenAI 环境变量后可用哦!

🎨 Major Update: DALL·E Image Generation Now Available!

• 🖼️ Introduced /img command to unleash your creative imagination

  • Format: "/img description image size"
  • Generates 1024x1024 images by default
    • 🎛️ Added DALL_E_MODEL environment variable, defaulting to DALL·E 3
    • 📐 Smart resolution suggestions: System recommends available options if unsupported sizes are entered
    • 📚 /help command now includes /img usage instructions

Note: DALL·E feature is only available when OpenAI environment variables are configured!

GPT-Telegram-Worker -

Published by snakeying 27 days ago

🎉 功能改进:操作更简,体验更佳!

• 🌐 升级 /language 命令,引入菜单选择功能

  • 告别手动输入,轻点即可切换语言
    • 🔄 优化 /switchmodel 命令,新增模型菜单
  • 一目了然,点选即可更换AI模型
    • 📝 改进长篇Markdown输出的显示效果
  • 让复杂内容更易阅读,信息更清晰
    • 🐞 修复已知bug,确保稳定流畅的使用体验

🎉 Feature Improvements: Simpler Operations, Better Experience!

• 🌐 Enhanced /language command with menu selection

  • Say goodbye to manual input, switch languages with a simple click
    • 🔄 Upgraded /switchmodel command, introducing a model selection menu
  • Clear overview, effortless AI model switching
    • 📝 Improved display of long Markdown outputs
  • Making complex content more readable and information clearer
    • 🐞 Fixed known bugs for a stable and smooth user experience
GPT-Telegram-Worker -

Published by snakeying 27 days ago

🚀 功能升级:为您带来更多选择和便利!

• 🔄 新增 /switchmodel 命令,灵活切换AI模型

  • 输入无效时,贴心提示可用模型选项
  • 切换模型后自动清空对话历史,并即时通知用户
    • 🆘 推出 /help 命令,随时获取使用帮助(具体内容持续完善中)

🚀 Feature Update: More Choices and Convenience at Your Fingertips!

• 🔄 Introduced /switchmodel command for flexible AI model switching

  • Provides helpful prompts with available model options if input is invalid
  • Automatically clears chat history upon model switch, with instant user notification
    • 🆘 Launched /help command for on-demand assistance (detailed content coming soon)
GPT-Telegram-Worker -

Published by snakeying 27 days ago

📢 功能优化:让对话更流畅,体验更贴心!

• 📜➡️📃 新增超长消息自动分段发送功能,告别内容截断烦恼
• 🌐🔧 优化 /history 命令,现在将根据用户设定的语言精准总结对话历史

📢 Feature Enhancements: Smoother Conversations, Better Experience!

• 📜➡️📃 Implemented automatic segmentation for lengthy messages, eliminating content truncation issues
• 🌐🔧 Refined /history command, now summarizing chat history in the user's preferred language

Related Projects