[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-zhayujie--bot-on-anything":3,"tool-zhayujie--bot-on-anything":64},[4,17,25,39,48,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":10,"last_commit_at":23,"category_tags":24,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,15],{"id":26,"name":27,"github_repo":28,"description_zh":29,"stars":30,"difficulty_score":10,"last_commit_at":31,"category_tags":32,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[33,34,35,36,14,37,15,13,38],"图像","数据工具","视频","插件","其他","音频",{"id":40,"name":41,"github_repo":42,"description_zh":43,"stars":44,"difficulty_score":45,"last_commit_at":46,"category_tags":47,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,3,"2026-04-04T04:44:48",[14,33,13,15,37],{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":45,"last_commit_at":54,"category_tags":55,"status":16},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",74913,"2026-04-05T10:44:17",[15,33,13,37],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":45,"last_commit_at":62,"category_tags":63,"status":16},2181,"OpenHands","OpenHands\u002FOpenHands","OpenHands 是一个专注于 AI 驱动开发的开源平台，旨在让智能体（Agent）像人类开发者一样理解、编写和调试代码。它解决了传统编程中重复性劳动多、环境配置复杂以及人机协作效率低等痛点，通过自动化流程显著提升开发速度。\n\n无论是希望提升编码效率的软件工程师、探索智能体技术的研究人员，还是需要快速原型验证的技术团队，都能从中受益。OpenHands 提供了灵活多样的使用方式：既可以通过命令行（CLI）或本地图形界面在个人电脑上轻松上手，体验类似 Devin 的流畅交互；也能利用其强大的 Python SDK 自定义智能体逻辑，甚至在云端大规模部署上千个智能体并行工作。\n\n其核心技术亮点在于模块化的软件智能体 SDK，这不仅构成了平台的引擎，还支持高度可组合的开发模式。此外，OpenHands 在 SWE-bench 基准测试中取得了 77.6% 的优异成绩，证明了其解决真实世界软件工程问题的能力。平台还具备完善的企业级功能，支持与 Slack、Jira 等工具集成，并提供细粒度的权限管理，适合从个人开发者到大型企业的各类用户场景。",70612,"2026-04-05T11:12:22",[15,14,13,36],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":77,"owner_email":81,"owner_twitter":77,"owner_website":82,"owner_url":83,"languages":84,"stars":109,"forks":110,"last_commit_at":111,"license":112,"difficulty_score":10,"env_os":113,"env_gpu":114,"env_ram":114,"env_deps":115,"category_tags":124,"github_topics":125,"view_count":10,"oss_zip_url":77,"oss_zip_packed_at":77,"status":16,"created_at":133,"updated_at":134,"faqs":135,"releases":166},2355,"zhayujie\u002Fbot-on-anything","bot-on-anything","A large model-based chatbot builder that can quickly integrate AI models (including ChatGPT, Claude, Gemini) into various software applications (such as Telegram, Gmail, Slack, and websites).","Bot-on-Anything 是一款强大的开源 AI 聊天机器人构建工具，旨在帮助开发者轻松将 ChatGPT、Claude、Gemini 等大语言模型集成到各类软件应用中。无论是 Telegram、Slack、钉钉、飞书等即时通讯平台，还是 Gmail 邮箱、个人网站乃至命令行终端，它都能通过轻量级配置快速实现对接。\n\n该工具主要解决了大模型与应用场景之间“连接难、适配繁”的痛点。传统开发往往需要为不同平台编写重复的接口代码，而 Bot-on-Anything 采用模块化架构，实现了模型能力与应用渠道的解耦。用户只需修改配置文件中的类型字段，即可在同一项目中灵活切换不同的 AI 模型或部署渠道，无需重写核心逻辑，极大提升了开发效率与系统的可扩展性。\n\nBot-on-Anything 特别适合具备一定编程基础的开发者、技术爱好者以及希望快速验证 AI 应用场景的研究人员使用。其支持 Linux、macOS 和 Windows 系统，基于 Python 运行，安装部署简便。凭借“一次配置，多端复用”的独特设计，它让构建跨平台智能对话机器人变得像搭积木一样简单，是探索 AI 落地应用的理","Bot-on-Anything 是一款强大的开源 AI 聊天机器人构建工具，旨在帮助开发者轻松将 ChatGPT、Claude、Gemini 等大语言模型集成到各类软件应用中。无论是 Telegram、Slack、钉钉、飞书等即时通讯平台，还是 Gmail 邮箱、个人网站乃至命令行终端，它都能通过轻量级配置快速实现对接。\n\n该工具主要解决了大模型与应用场景之间“连接难、适配繁”的痛点。传统开发往往需要为不同平台编写重复的接口代码，而 Bot-on-Anything 采用模块化架构，实现了模型能力与应用渠道的解耦。用户只需修改配置文件中的类型字段，即可在同一项目中灵活切换不同的 AI 模型或部署渠道，无需重写核心逻辑，极大提升了开发效率与系统的可扩展性。\n\nBot-on-Anything 特别适合具备一定编程基础的开发者、技术爱好者以及希望快速验证 AI 应用场景的研究人员使用。其支持 Linux、macOS 和 Windows 系统，基于 Python 运行，安装部署简便。凭借“一次配置，多端复用”的独特设计，它让构建跨平台智能对话机器人变得像搭积木一样简单，是探索 AI 落地应用的理想起点。","\u003Cp align=\"center\">\u003Cimg src= \"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F6e931057-e09f-4742-9fbd-2417cf6bc2f3\" alt=\"Bot-On-Anything\" width=\"600\" \u002F>\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Freleases\u002Flatest\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fzhayujie\u002Fbot-on-anything\" alt=\"Latest release\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fblob\u002Fmaster\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fzhayujie\u002Fbot-on-anything\" alt=\"License: MIT\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fzhayujie\u002Fbot-on-anything?style=flat-square\" alt=\"Stars\">\u003C\u002Fa> \u003Cbr\u002F>\n    [\u003Ca href=\"\u002FREADME.md\">English\u003C\u002Fa>] | [\u003Ca href=\"\u002Fdocs\u002FREADME-CN.md\">中文\u003C\u002Fa>]\n\u003C\u002Fp>\n\n**Bot on Anything** is a powerful AI chatbot builder that allows you to quickly build chatbots and run them anywhere.\n\n# Introduction\n\nDevelopers can build and run an intelligent dialogue robot by selecting a connection between various AI large models and application channels with lightweight configuration. It supports easy switching between multiple paths within a single project. This architecture has strong scalability; each application can reuse existing model capabilities, and each new model can run on all application channels.\n\n**Models:**\n\n - [x] [ChatGPT](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#1-chatgpt)\n - [ ] [Claude](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything)\n - [ ] [Gemini](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything)\n\n**Applications:**\n\n - [x] [Terminal](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#1%E5%91%BD%E4%BB%A4%E8%A1%8C%E7%BB%88%E7%AB%AF)\n - [x] [Web](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#9web)\n - [x] [Subscription Account](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#3%E4%B8%AA%E4%BA%BA%E8%AE%A2%E9%98%85%E5%8F%B7)\n - [x] [Service Account](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#4%E4%BC%81%E4%B8%9A%E6%9C%8D%E5%8A%A1%E5%8F%B7)\n - [x] [Enterprise WeChat](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#12%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1)\n - [x] [Telegram](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#6telegram)\n - [x] [QQ](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#5qq)\n - [x] [DingTalk](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#10%E9%92%89%E9%92%89)\n - [x] [Feishu](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#11%E9%A3%9E%E4%B9%A6)\n - [x] [Gmail](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#7gmail)\n - [x] [Slack](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#8slack)\n\n# Quick Start\n\n### 1. Runtime Environment\n\nSupports Linux, MacOS, and Windows systems, and Python must be installed. It is recommended to use Python version between 3.7.1 and 3.10.\n\nClone the project code and install dependencies:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\ncd bot-on-anything\u002F\npip3 install -r requirements.txt\n```\n\n### 2. Configuration Instructions\n\nThe core configuration file is `config.json`, and a template file `config-template.json` is provided in the project, which can be copied to generate the final effective `config.json` file:\n\n```bash\ncp config-template.json config.json\n```\n\nEach model and channel has its own configuration block, which together form a complete configuration file. The overall structure is as follows:\n\n```bash\n{\n  \"model\": {\n    \"type\" : \"openai\",             # Selected AI model\n    \"openai\": {\n      # openAI configuration\n    }\n  },\n  \"channel\": {\n    \"type\": \"slack\",            # Channel to be integrated\n    \"slack\": {\n        # slack configuration\n    },\n    \"telegram\": {\n        # telegram configuration\n    }\n  }\n}\n```\nThe configuration file is divided into `model` and `channel` sections at the outermost level. The model section is for model configuration, where the `type` specifies which model to use; the channel section contains the configuration for application channels, and the `type` field specifies which application to integrate.\n\nWhen using, you only need to change the `type` field under the model and channel configuration blocks to switch between any model and application, connecting different paths. Below, each model and application configuration and running process will be introduced in turn.\n\n### 3. Running\n\nRun the following command in the project root directory, with the default channel being the terminal:\n\n```bash\npython3 app.py\n```\n\n## II. Choose a Model\n\n### 1. ChatGPT\n\nThe default model is `gpt-3.5-turbo`. For details, refer to the [official documentation](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Fchat). It also supports `gpt-4.0`, just modify the model type parameter.\n\n#### (1) Install Dependencies\n\n```bash\npip3 install --upgrade openai\n```\n> Note: The openai version needs to be above `0.27.0`. If installation fails, you can first upgrade pip with `pip3 install --upgrade pip`.\n\n#### (2) Configuration Item Instructions\n\n```bash\n{\n  \"model\": {\n    \"type\" : \"chatgpt\",\n    \"openai\": {\n      \"api_key\": \"YOUR API KEY\",\n      \"model\": \"gpt-3.5-turbo\",                         # Model name\n      \"proxy\": \"http:\u002F\u002F127.0.0.1:7890\",                 # Proxy address\n      \"character_desc\": \"You are ChatGPT, a large language model trained by OpenAI, aimed at answering and solving any questions people have, and can communicate in multiple languages. When asked who you are, you should also tell the questioner that entering #clear_memory can start a new topic exploration. Entering draw xx can create a picture for you.\",\n      \"conversation_max_tokens\": 1000,                  # Maximum number of characters in the reply, total for input and output\n      \"temperature\":0.75,     # Entropy, between [0,1], the larger the value, the more random the selected candidate words, the more uncertain the reply, it is recommended to use either this or the top_p parameter, the greater the creativity task, the better, the smaller the precision task\n      \"top_p\":0.7,            # Candidate word list. 0.7 means only considering the top 70% of candidate words, it is recommended to use either this or the temperature parameter\n      \"frequency_penalty\":0.0,            # Between [-2,2], the larger this value, the more it reduces the repetition of words in the model's output, leaning towards producing different content\n      \"presence_penalty\":1.0,             # Between [-2,2], the larger this value, the less restricted by the input, encouraging the model to generate new words not present in the input, leaning towards producing different content\n    }\n}\n```\n + `api_key`: Fill in the `OpenAI API KEY` created when registering your account.\n + `model`: Model name, currently supports `gpt-3.5-turbo`, `gpt-4`, `gpt-4-32k` (the gpt-4 API is not yet open).\n + `proxy`: The address of the proxy client, refer to [#56](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fissues\u002F56) for details.\n + `character_desc`: This configuration saves a piece of text you say to ChatGPT, and it will remember this text as its setting; you can customize any personality for it.\n + `max_history_num`[optional]: Maximum memory length of the conversation, exceeding this length will clear the previous memory.\n\n---\n\n### 2. LinkAI\n\n#### Configuration Item Instructions\n```bash\n{\n  \"model\": {\n    \"type\" : \"linkai\",\n    \"linkai\": {\n      \"api_key\": \"\",\n      \"api_base\": \"https:\u002F\u002Fapi.link-ai.tech\",\n      \"app_code\":  \"\",\n      \"model\": \"\",\n      \"conversation_max_tokens\": 1000,\n      \"temperature\":0.75,\n      \"top_p\":0.7,\n      \"frequency_penalty\":0.0,\n      \"presence_penalty\":1.0,\n      \"character_desc\": \"You are an intelligent assistant.\"\n    },\n}\n```\n\n+ `api_key`: The key for calling the LinkAI service, which can be created in the [console](https:\u002F\u002Flink-ai.tech\u002Fconsole\u002Finterface).\n+ `app_code`: The code for the LinkAI application or workflow, optional, refer to [Application Creation](https:\u002F\u002Fdocs.link-ai.tech\u002Fplatform\u002Fcreate-app).\n+ `model`: Supports common models from both domestic and international sources, refer to [Model List](https:\u002F\u002Fdocs.link-ai.tech\u002Fplatform\u002Fapi\u002Fchat#models). It can be left blank, and the default model of the application can be modified in the [LinKAI platform](https:\u002F\u002Flink-ai.tech\u002Fconsole\u002Ffactory).\n+ Other parameters have the same meaning as those in the ChatGPT model.\n\n## III. Choose a Channel\n\n### 1. Command Line Terminal\n\nThe application that starts by default in the configuration template is the terminal, which requires no additional configuration. You can start the program by executing `python3 app.py` directly in the project directory. Users interact with the dialogue model through command line input, and it supports streaming response effects.\n\n![terminal_demo.png](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhayujie_bot-on-anything_readme_0443745d6dbf.png)\n\n---\n\n### 2. Web\n\n**Contributor:** [RegimenArsenic](https:\u002F\u002Fgithub.com\u002FRegimenArsenic)\n\n**Dependencies**\n\n```bash\npip3 install PyJWT flask flask_socketio\n```\n\n**Configuration**\n\n```bash\n\"channel\": {\n    \"type\": \"http\",\n    \"http\": {\n      \"http_auth_secret_key\": \"6d25a684-9558-11e9-aa94-efccd7a0659b\",    \u002F\u002F JWT authentication secret key\n      \"http_auth_password\": \"6.67428e-11\",        \u002F\u002F Authentication password, just for personal use, a preliminary defense against others scanning ports and DDOS wasting tokens\n      \"port\": \"80\"       \u002F\u002F Port\n    }\n  }\n```\n\nRun locally: After running `python3 app.py`, access `http:\u002F\u002F127.0.0.1:80`.\n\nRun on a server: After deployment, access `http:\u002F\u002Fpublic domain or IP:port`.\n\n---\n\n### 3. Personal Subscription Account\n\n**Requirements:** A server and a subscription account.\n\n#### 3.1 Dependency Installation\n\nInstall the [werobot](https:\u002F\u002Fgithub.com\u002Foffu\u002FWeRoBot) dependency:\n\n```bash\npip3 install werobot\n```\n\n#### 3.2 Configuration\n\n```bash\n\"channel\": {\n    \"type\": \"wechat_mp\",\n\n    \"wechat_mp\": {\n      \"token\": \"YOUR TOKEN\",           # Token value\n      \"port\": \"8088\"                   # Port the program listens on\n    }\n}\n```\n\n#### 3.3 Run the Program\n\nRun `python3 app.py` in the project directory. If the terminal displays the following, it indicates successful operation:\n\n```\n[INFO][2023-02-16 01:39:53][app.py:12] - [INIT] load config: ...\n[INFO][2023-02-16 01:39:53][wechat_mp_channel.py:25] - [WX_Public] Wechat Public account service start!\nBottle v0.12.23 server starting up (using AutoServer())...\nListening on http:\u002F\u002F127.0.0.1:8088\u002F\nHit Ctrl-C to quit.\n```\n\n#### 2.2 Set the Callback URL for the Subscription Account\n\nGo to the personal subscription account in the [WeChat Official Platform](https:\u002F\u002Fmp.weixin.qq.com\u002F) and enable server configuration:\n\n![wx_mp_config.png](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhayujie_bot-on-anything_readme_793a515bc284.png)\n\n**Server Address (URL) Configuration**: If you can access the Python program on the server through the configured URL in the browser (default listening on port 8088), it indicates that the configuration is valid. Since the subscription account can only configure ports 80\u002F443, you can modify the configuration to listen directly on port 80 (requires sudo permissions) or use reverse proxy forwarding (like nginx). According to the official documentation, you can fill in either the public IP or domain name here.\n\n**Token Configuration**: Must be consistent with the token in the `config.json` configuration.\n\nFor detailed operation processes, refer to the [official documentation](https:\u002F\u002Fdevelopers.weixin.qq.com\u002Fdoc\u002Foffiaccount\u002FGetting_Started\u002FGetting_Started_Guide.html).\n\n#### 2.3 Usage\n\nAfter users follow the subscription account, they can send messages.\n\n> Note: After users send messages, the WeChat backend will push to the configured URL address, but if there is no reply within 5 seconds, the connection will be disconnected, and it will retry 3 times. However, the request to the OpenAI interface often takes more than 5 seconds. In this project, asynchronous and caching methods have optimized the 5-second timeout limit to 15 seconds, but exceeding this time will still not allow normal replies. At the same time, each time the connection is disconnected after 5 seconds, the web framework will report an error, which will be optimized later.\n\n---\n\n### 4. Enterprise Service Account\n\n**Requirements:** A server and a certified service account.\n\nIn the enterprise service account, the 15-second timeout issue of the personal subscription account is resolved by first asynchronously accessing the OpenAI interface and then proactively pushing to the user through the customer service interface. The developer mode configuration of the service account is similar to that of the subscription account. For details, refer to the [official documentation](https:\u002F\u002Fdevelopers.weixin.qq.com\u002Fdoc\u002Foffiaccount\u002FGetting_Started\u002FGetting_Started_Guide.html).\n\nThe `config.json` configuration for the enterprise service account only needs to change the type to `wechat_mp_service`, but the configuration block still reuses `wechat_mp`, and in addition, you need to add two configuration items: `app_id` and `app_secret`.\n\n```bash\n\"channel\": {\n    \"type\": \"wechat_mp_service\",\n\n    \"wechat_mp\": {\n      \"token\": \"YOUR TOKEN\",            # Token value\n      \"port\": \"8088\",                   # Port the program listens on\n      \"app_id\": \"YOUR APP ID\",          # App ID\n      \"app_secret\": \"YOUR APP SECRET\"   # App secret\n    }\n}\n```\n\nNote: The server IP address must be configured in the \"IP Whitelist\"; otherwise, users will not receive proactively pushed messages.\n\n---\n\n### 5. QQ\n\nRequirements: A PC or server (domestic network) and a QQ account.\n\nRunning the QQ bot requires additionally running a `go-cqhttp` program, which is responsible for receiving and sending QQ messages, while our `bot-on-anything` program is responsible for accessing OpenAI to generate dialogue content.\n\n#### 5.1 Download go-cqhttp\n\nDownload the corresponding machine program from the [go-cqhttp Release](https:\u002F\u002Fgithub.com\u002FMrs4s\u002Fgo-cqhttp\u002Freleases), unzip it, and place the `go-cqhttp` binary file in our `bot-on-anything\u002Fchannel\u002Fqq` directory. A `config.yml` configuration file is already prepared here; you only need to fill in the QQ account configuration (account-uin).\n\n#### 5.2 Install aiocqhttp\n\nUse [aiocqhttp](https:\u002F\u002Fgithub.com\u002Fnonebot\u002Faiocqhttp) to interact with go-cqhttp, execute the following command to install the dependency:\n\n```bash\npip3 install aiocqhttp\n```\n\n#### 5.3 Configuration\n\nSimply change the `type` in the `config.json` configuration file's channel block to `qq`:\n\n```bash\n\"channel\": {\n    \"type\": \"qq\"\n}\n```\n\n#### 5.4 Running\n\nFirst, go to the root directory of the `bot-on-anything` project and run in Terminal 1:\n\n```bash\npython3 app.py    # This will listen on port 8080\n```\n\nIn the second step, open Terminal 2, navigate to the directory where `cqhttp` is located, and run:\n\n```bash\ncd channel\u002Fqq\n.\u002Fgo-cqhttp\n```\nNote:\n+ Currently, no keyword matching or group chat whitelist is set; all private chats will automatically reply, and in group chats, as long as you are @mentioned, it will also automatically reply.\n+ If you encounter exceptions such as account freezing, you can change the value of `protocol` in the `device.json` file in the same directory as go-cqhttp from 5 to 2, refer to this [Issue](https:\u002F\u002Fgithub.com\u002FMrs4s\u002Fgo-cqhttp\u002Fissues\u002F1942).\n\n---\n\n### 6. Telegram\n\nContributor: [brucelt1993](https:\u002F\u002Fgithub.com\u002Fbrucelt1993)\n\n**6.1 Get Token**\n\nApplying for a Telegram bot can be easily found on Google; the important thing is to obtain the bot's token ID.\n\n**6.2 Dependency Installation**\n\n```bash\npip install pyTelegramBotAPI\n```\n\n**6.3 Configuration**\n\n```bash\n\"channel\": {\n    \"type\": \"telegram\",\n    \"telegram\":{\n      \"bot_token\": \"YOUR BOT TOKEN ID\"\n    }\n}\n```\n---\n\n### 7. Gmail\n\nRequirements: A server and a Gmail account.\n\n**Contributor:** [Simon](https:\u002F\u002Fgithub.com\u002F413675377)\n\nFollow the [official documentation](https:\u002F\u002Fsupport.google.com\u002Fmail\u002Fanswer\u002F185833?hl=en) to create an APP password for your Google account, configure as below, then cheers!!!\n\n```bash\n\"channel\": {\n    \"type\": \"gmail\",\n    \"gmail\": {\n      \"subject_keyword\": [\"bot\", \"@bot\"],\n      \"host_email\": \"xxxx@gmail.com\",\n      \"host_password\": \"GMAIL ACCESS KEY\"\n    }\n  }\n```\n---\n\n### 8. Slack\n\n**❉ No longer requires a server or public IP**\n\n**Contributor:** [amaoo](https:\u002F\u002Fgithub.com\u002Famaoo)\n\n**Dependencies**\n\n```bash\npip3 install slack_bolt\n```\n\n**Configuration**\n\n```bash\n\"channel\": {\n    \"type\": \"slack\",\n    \"slack\": {\n      \"slack_bot_token\": \"xoxb-xxxx\",\n      \"slack_app_token\": \"xapp-xxxx\"\n    }\n  }\n```\n\n**Set Bot Token Scope - OAuth & Permission**\n\nWrite the Bot User OAuth Token into the configuration file `slack_bot_token`.\n\n```\napp_mentions:read\nchat:write\n```\n\n**Enable Socket Mode - Socket Mode**\n\nIf you have not created an application-level token, you will be prompted to create one. Write the created token into the configuration file `slack_app_token`.\n\n**Event Subscription (Event Subscriptions) - Subscribe to Bot Events**\n\n```\napp_mention\n```\n\n**Reference Documentation**\n\n```\nhttps:\u002F\u002Fslack.dev\u002Fbolt-python\u002Ftutorial\u002Fgetting-started\n```\n\n---\n\n### 10. DingTalk\n\n**Requirements:**\n\n- Enterprise internal development robot.\n\n**Dependencies**\n\n```bash\npip3 install requests flask\n```\n**Configuration**\n\n```bash\n\"channel\": {\n    \"type\": \"dingtalk\",\n    \"dingtalk\": {\n      \"image_create_prefix\": [\"draw\", \"draw\", \"Draw\"],\n      \"port\": \"8081\",                  # External port\n      \"dingtalk_token\": \"xx\",          # Access token of the webhook address\n      \"dingtalk_post_token\": \"xx\",     # Verification token carried in the header when DingTalk posts back messages\n      \"dingtalk_secret\": \"xx\"          # Security encryption signature string in the group robot\n    }\n  }\n```\n**Reference Documentation**:\n\n- [DingTalk Internal Robot Tutorial](https:\u002F\u002Fopen.dingtalk.com\u002Fdocument\u002Ftutorial\u002Fcreate-a-robot#title-ufs-4gh-poh)\n- [Custom Robot Access Documentation](https:\u002F\u002Fopen.dingtalk.com\u002Fdocument\u002Ftutorial\u002Fcreate-a-robot#title-ufs-4gh-poh)\n- [Enterprise Internal Development Robot Tutorial Documentation](https:\u002F\u002Fopen.dingtalk.com\u002Fdocument\u002Frobots\u002Fenterprise-created-chatbot)\n\n**Generate Robot**\n\nAddress: https:\u002F\u002Fopen-dev.dingtalk.com\u002Ffe\u002Fapp#\u002Fcorp\u002Frobot\nAdd a robot, set the server's outbound IP in the development management, and the message receiving address (the external address in the configuration, such as https:\u002F\u002Fxx.xx.com:8081).\n\n---\n\n### 11. Feishu\n\n**Dependencies**\n\n```bash\npip3 install requests flask\n```\n**Configuration**\n\n```bash\n\"channel\": {\n    \"type\": \"feishu\",\n    \"feishu\": {\n        \"image_create_prefix\": [\n            \"draw\",\n            \"draw\",\n            \"Draw\"\n        ],\n        \"port\": \"8082\",                  # External port\n        \"app_id\": \"xxx\",                 # Application app_id\n        \"app_secret\": \"xxx\",             # Application Secret\n        \"verification_token\": \"xxx\"      # Event subscription Verification Token\n    }\n}\n```\n\n**Generate Robot**\n\nAddress: https:\u002F\u002Fopen.feishu.cn\u002Fapp\u002F\n1. Add a self-built application for the enterprise.\n2. Enable permissions:\n    - im:message\n    - im:message.group_at_msg\n    - im:message.group_at_msg:readonly\n    - im:message.p2p_msg\n    - im:message.p2p_msg:readonly\n    - im:message:send_as_bot\n3. Subscribe to the menu to add events (receive messages v2.0) and configure the request address (the external address in the configuration, such as https:\u002F\u002Fxx.xx.com:8081).\n4. In version management and publishing, launch the application, and the app will receive review information. After passing the review, add the self-built application in the group.\n\n---\n\n### 12. Enterprise WeChat\n\n**Requirements:** A server and a certified Enterprise WeChat.\n\nThe `config.json` configuration for Enterprise WeChat only needs to change the type to `wechat_com`, with the default message receiving server URL: http:\u002F\u002Fip:8888\u002Fwechat.\n\n```bash\n\"channel\": {\n    \"type\": \"wechat_com\",\n    \"wechat_com\": {\n      \"wechat_token\": \"YOUR TOKEN\",            # Token value\n      \"port\": \"8888\",                          # Port the program listens on\n      \"app_id\": \"YOUR APP ID\",                 # App ID\n      \"app_secret\": \"YOUR APP SECRET\",          # App secret\n      \"wechat_corp_id\": \"YOUR CORP ID\",\n      \"wechat_encoding_aes_key\": \"YOUR AES KEY\"\n    }\n}\n```\n\nNote: The server IP address must be configured in the \"Enterprise Trusted IP\" list; otherwise, users will not receive proactively pushed messages.\n\n**Reference Documentation**:\n\n- [Enterprise WeChat Configuration Tutorial](https:\u002F\u002Fwww.wangpc.cc\u002Fsoftware\u002Fwechat_com-chatgpt\u002F)\n\n### General Configuration\n\n+ `clear_memory_commands`: Dialogue internal commands to actively clear previous memory, the string array can customize command aliases.\n  + default: [\"#clear_memory\"]\n","\u003Cp align=\"center\">\u003Cimg src= \"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F6e931057-e09f-4742-9fbd-2417cf6bc2f3\" alt=\"Bot-On-Anything\" width=\"600\" \u002F>\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Freleases\u002Flatest\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fzhayujie\u002Fbot-on-anything\" alt=\"最新版本\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fblob\u002Fmaster\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fzhayujie\u002Fbot-on-anything\" alt=\"许可证：MIT\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fzhayujie\u002Fbot-on-anything?style=flat-square\" alt=\"星标\">\u003C\u002Fa> \u003Cbr\u002F>\n    [\u003Ca href=\"\u002FREADME.md\">English\u003C\u002Fa>] | [\u003Ca href=\"\u002Fdocs\u002FREADME-CN.md\">中文\u003C\u002Fa>]\n\u003C\u002Fp>\n\n**Bot on Anything** 是一款功能强大的 AI 聊天机器人构建工具，可帮助您快速搭建聊天机器人，并将其部署到任何地方运行。\n\n# 简介\n\n开发者只需通过轻量级配置，即可在各类 AI 大模型与应用渠道之间进行选择并建立连接，从而构建和运行智能对话机器人。它支持在一个项目中轻松切换多种路径。这种架构具有很强的扩展性：每个应用都可以复用现有的模型能力，而每新增一个模型也可以在所有应用渠道上运行。\n\n**模型：**\n\n - [x] [ChatGPT](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#1-chatgpt)\n - [ ] [Claude](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything)\n - [ ] [Gemini](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything)\n\n**应用：**\n\n - [x] [终端](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#1%E5%91%BD%E4%BB%A4%E8%A1%8C%E7%BB%88%E7%AB%AF)\n - [x] [Web](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#9web)\n - [x] [订阅号](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#3%E4%B8%AA%E4%BA%BA%E8%AE%A2%E9%98%85%E5%8F%B7)\n - [x] [服务号](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#4%E4%BC%81%E4%B8%9A%E6%9C%8D%E5%8A%A1%E5%8F%B7)\n - [x] [企业微信](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#12%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1)\n - [x] [Telegram](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#6telegram)\n - [x] [QQ](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#5qq)\n - [x] [钉钉](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#10%E9%92%89%E9%92%89)\n - [x] [飞书](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#11%E9%A3%9E%E4%B9%A6)\n - [x] [Gmail](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#7gmail)\n - [x] [Slack](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything#8slack)\n\n# 快速入门\n\n### 1. 运行环境\n\n支持 Linux、MacOS 和 Windows 系统，且需安装 Python。建议使用 Python 3.7.1 至 3.10 版本。\n\n克隆项目代码并安装依赖：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\ncd bot-on-anything\u002F\npip3 install -r requirements.txt\n```\n\n### 2. 配置说明\n\n核心配置文件为 `config.json`，项目中提供了一个模板文件 `config-template.json`，可将其复制生成最终有效的 `config.json` 文件：\n\n```bash\ncp config-template.json config.json\n```\n\n每个模型和渠道都有各自的配置块，共同组成完整的配置文件。整体结构如下所示：\n\n```bash\n{\n  \"model\": {\n    \"type\" : \"openai\",             # 所选 AI 模型\n    \"openai\": {\n      # openAI 配置\n    }\n  },\n  \"channel\": {\n    \"type\": \"slack\",            # 要集成的渠道\n    \"slack\": {\n        # slack 配置\n    },\n    \"telegram\": {\n        # telegram 配置\n    }\n  }\n}\n```\n配置文件最外层分为 `model` 和 `channel` 两部分。其中，`model` 部分用于模型配置，`type` 字段指定了要使用的模型；`channel` 部分则包含应用渠道的配置，`type` 字段指定了要集成的应用。\n\n使用时，只需更改模型和渠道配置块下的 `type` 字段，即可在任意模型和应用之间切换，实现不同路径的连接。接下来将依次介绍各模型及应用的配置与运行流程。\n\n### 3. 运行\n\n在项目根目录下运行以下命令，默认渠道为终端：\n\n```bash\npython3 app.py\n```\n\n## II. 选择模型\n\n### 1. ChatGPT\n\n默认模型为 `gpt-3.5-turbo`。详情请参阅[官方文档](https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fguides\u002Fchat)。它也支持 `gpt-4.0`，只需修改模型类型参数即可。\n\n#### (1) 安装依赖\n\n```bash\npip3 install --upgrade openai\n```\n> 注意：openai 版本需高于 `0.27.0`。若安装失败，可先通过 `pip3 install --upgrade pip` 升级 pip。\n\n#### (2) 配置项说明\n\n```bash\n{\n  \"model\": {\n    \"type\" : \"chatgpt\",\n    \"openai\": {\n      \"api_key\": \"YOUR API KEY\",\n      \"model\": \"gpt-3.5-turbo\",                         # 模型名称\n      \"proxy\": \"http:\u002F\u002F127.0.0.1:7890\",                 # 代理地址\n      \"character_desc\": \"你是 ChatGPT，由 OpenAI 训练的大型语言模型，旨在回答和解决人们提出的任何问题，并能用多种语言交流。当被问及你是谁时，你也应告知提问者，输入 #clear_memory 可开始新的主题探讨。输入 draw xx 可为你生成一幅图片。\",\n      \"conversation_max_tokens\": 1000,                  # 回复的最大字符数，包括输入和输出总和\n      \"temperature\":0.75,     # 熵值，范围在 [0,1] 之间，值越大，候选词选择越随机，回复不确定性越高；建议与 top_p 参数二选一，创造性任务推荐使用较高值，精确性任务则推荐较低值\n      \"top_p\":0.7,            # 候选词列表。0.7 表示仅考虑前 70% 的候选词，建议与 temperature 参数二选一\n      \"frequency_penalty\":0.0,            # 范围在 [-2,2] 之间，该值越大，越能减少模型输出中词语的重复，倾向于生成不同的内容\n      \"presence_penalty\":1.0,             # 范围在 [-2,2] 之间，该值越大，模型受输入限制越小，鼓励生成未出现在输入中的新词，倾向于生成不同内容\n    }\n  }\n```\n + `api_key`: 填写注册账号时创建的 `OpenAI API KEY`。\n + `model`: 模型名称，目前支持 `gpt-3.5-turbo`、`gpt-4`、`gpt-4-32k`（gpt-4 API 尚未开放）。\n + `proxy`: 代理客户端地址，详情请参阅 [#56](https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fissues\u002F56)。\n + `character_desc`: 此配置保存一段您对 ChatGPT 所说的文本，ChatGPT 会将其作为自身设定记住；您可以为其自定义任何个性。\n + `max_history_num`[可选]: 对话的最大记忆长度，超过此长度将清除之前的记忆。\n\n---\n\n### 2. LinkAI\n\n#### 配置项说明\n```bash\n{\n  \"model\": {\n    \"type\" : \"linkai\",\n    \"linkai\": {\n      \"api_key\": \"\",\n      \"api_base\": \"https:\u002F\u002Fapi.link-ai.tech\",\n      \"app_code\":  \"\",\n      \"model\": \"\",\n      \"conversation_max_tokens\": 1000,\n      \"temperature\":0.75,\n      \"top_p\":0.7,\n      \"frequency_penalty\":0.0,\n      \"presence_penalty\":1.0,\n      \"character_desc\": \"你是一个智能助手。\"\n    },\n  }\n```\n\n+ `api_key`: 调用 LinkAI 服务的密钥，可在[控制台](https:\u002F\u002Flink-ai.tech\u002Fconsole\u002Finterface)创建。\n+ `app_code`: LinkAI 应用程序或工作流的代码，可选，详情请参阅[应用创建](https:\u002F\u002Fdocs.link-ai.tech\u002Fplatform\u002Fcreate-app)。\n+ `model`: 支持国内外常用模型，详情请参阅[模型列表](https:\u002F\u002Fdocs.link-ai.tech\u002Fplatform\u002Fapi\u002Fchat#models)。可留空，应用程序的默认模型可在[LinkAI 平台](https:\u002F\u002Flink-ai.tech\u002Fconsole\u002Ffactory)中修改。\n+ 其他参数含义与 ChatGPT 模型中的参数相同。\n\n## III. 选择通道\n\n### 1. 命令行终端\n\n配置模板中默认启动的应用程序是终端模式，无需额外配置。您可以在项目目录下直接执行 `python3 app.py` 启动程序。用户通过命令行输入与对话模型交互，并支持流式响应效果。\n\n![terminal_demo.png](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhayujie_bot-on-anything_readme_0443745d6dbf.png)\n\n---\n\n### 2. Web\n\n**贡献者:** [RegimenArsenic](https:\u002F\u002Fgithub.com\u002FRegimenArsenic)\n\n**依赖**\n\n```bash\npip3 install PyJWT flask flask_socketio\n```\n\n**配置**\n\n```bash\n\"channel\": {\n    \"type\": \"http\",\n    \"http\": {\n      \"http_auth_secret_key\": \"6d25a684-9558-11e9-aa94-efccd7a0659b\",    \u002F\u002F JWT 认证密钥\n      \"http_auth_password\": \"6.67428e-11\",        \u002F\u002F 认证密码，仅供个人使用，作为初步防御他人扫描端口和 DDOS 攻击浪费 token\n      \"port\": \"80\"       \u002F\u002F 端口\n    }\n  }\n```\n\n本地运行：执行 `python3 app.py` 后，访问 `http:\u002F\u002F127.0.0.1:80`。\n\n服务器部署：部署完成后，访问 `http:\u002F\u002F公网域名或IP:端口`。\n\n---\n\n### 3. 个人订阅号\n\n**要求：** 一台服务器和一个订阅号。\n\n#### 3.1 安装依赖\n\n安装 [werobot](https:\u002F\u002Fgithub.com\u002Foffu\u002FWeRoBot) 依赖：\n\n```bash\npip3 install werobot\n```\n\n#### 3.2 配置\n\n```bash\n\"channel\": {\n    \"type\": \"wechat_mp\",\n\n    \"wechat_mp\": {\n      \"token\": \"YOUR TOKEN\",           # Token值\n      \"port\": \"8088\"                   # 程序监听的端口\n    }\n}\n```\n\n#### 3.3 运行程序\n\n在项目目录下运行 `python3 app.py`。如果终端显示以下内容，则表示运行成功：\n\n```\n[INFO][2023-02-16 01:39:53][app.py:12] - [INIT] load config: ...\n[INFO][2023-02-16 01:39:53][wechat_mp_channel.py:25] - [WX_Public] 微信公众号服务启动！\nBottle v0.12.23 server starting up (using AutoServer())...\nListening on http:\u002F\u002F127.0.0.1:8088\u002F\nHit Ctrl-C to quit.\n```\n\n#### 2.2 设置订阅号的回调URL\n\n前往 [微信公众平台](https:\u002F\u002Fmp.weixin.qq.com\u002F) 的个人订阅号，启用服务器配置：\n\n![wx_mp_config.png](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhayujie_bot-on-anything_readme_793a515bc284.png)\n\n**服务器地址（URL）配置**：如果通过浏览器访问服务器上的 Python 程序时能够正常打开配置的 URL（默认监听 8088 端口），则说明配置有效。由于订阅号仅支持配置 80 或 443 端口，您可以将配置修改为直接监听 80 端口（需 sudo 权限）或使用反向代理转发（如 nginx）。根据官方文档，此处可填写公网 IP 或域名。\n\n**Token 配置**：必须与 `config.json` 中的 token 保持一致。\n\n详细操作流程请参考 [官方文档](https:\u002F\u002Fdevelopers.weixin.qq.com\u002Fdoc\u002Foffiaccount\u002FGetting_Started\u002FGetting_Started_Guide.html)。\n\n#### 2.3 使用方法\n\n用户关注订阅号后，即可发送消息。\n\n> 注意：用户发送消息后，微信后台会推送至配置的 URL 地址，但如果 5 秒内未回复，连接将会断开，并重试 3 次。然而，调用 OpenAI 接口通常需要超过 5 秒的时间。在本项目中，通过异步和缓存机制已将 5 秒的超时限制优化至 15 秒，但若超过此时间仍无法正常回复。同时，每次连接因 5 秒超时而断开时，Web 框架都会报错，后续将进一步优化。\n\n---\n\n### 4. 企业服务号\n\n**要求：** 一台服务器和一个认证的服务号。\n\n在企业服务号中，通过先异步访问 OpenAI 接口，再利用客服接口主动推送消息的方式，解决了个人订阅号 15 秒超时的问题。服务号的开发者模式配置与订阅号类似，详情请参阅 [官方文档](https:\u002F\u002Fdevelopers.weixin.qq.com\u002Fdoc\u002Foffiaccount\u002FGetting_Started\u002FGetting_Started_Guide.html)。\n\n企业服务号的 `config.json` 配置只需将类型改为 `wechat_mp_service`，但配置块仍沿用 `wechat_mp`，此外还需添加两个配置项：`app_id` 和 `app_secret`。\n\n```bash\n\"channel\": {\n    \"type\": \"wechat_mp_service\",\n\n    \"wechat_mp\": {\n      \"token\": \"YOUR TOKEN\",            # Token值\n      \"port\": \"8088\",                   # 程序监听的端口\n      \"app_id\": \"YOUR APP ID\",          # App ID\n      \"app_secret\": \"YOUR APP SECRET\"   # App secret\n    }\n}\n```\n\n注意：服务器 IP 必须配置到“IP 白名单”中，否则用户将无法接收到主动推送的消息。\n\n---\n\n### 5. QQ\n\n**要求：** 一台 PC 或服务器（国内网络）以及一个 QQ 账号。\n\n运行 QQ 机器人需要额外运行一个 `go-cqhttp` 程序，该程序负责接收和发送 QQ 消息，而我们的 `bot-on-anything` 程序则负责调用 OpenAI 生成对话内容。\n\n#### 5.1 下载 go-cqhttp\n\n从 [go-cqhttp Release](https:\u002F\u002Fgithub.com\u002FMrs4s\u002Fgo-cqhttp\u002Freleases) 下载对应系统的程序，解压后将 `go-cqhttp` 可执行文件放置于我们的 `bot-on-anything\u002Fchannel\u002Fqq` 目录中。此处已准备好 `config.yml` 配置文件，您只需填写 QQ 账号配置（账号 UIN）即可。\n\n#### 5.2 安装 aiocqhttp\n\n使用 [aiocqhttp](https:\u002F\u002Fgithub.com\u002Fnonebot\u002Faiocqhttp) 与 go-cqhttp 进行交互，执行以下命令安装依赖：\n\n```bash\npip3 install aiocqhttp\n```\n\n#### 5.3 配置\n\n只需将 `config.json` 配置文件中 channel 块的 `type` 改为 `qq` 即可：\n\n```bash\n\"channel\": {\n    \"type\": \"qq\"\n}\n```\n\n#### 5.4 运行\n\n首先，进入 `bot-on-anything` 项目的根目录，在终端 1 中运行：\n\n```bash\npython3 app.py    # 此时将监听 8080 端口\n```\n\n第二步，打开终端 2，进入 `cqhttp` 所在的目录，运行：\n\n```bash\ncd channel\u002Fqq\n.\u002Fgo-cqhttp\n```\n\n注意：\n+ 目前尚未设置关键词匹配或群聊白名单；所有私聊均会自动回复，在群聊中只要被 @ 到也会自动回复。\n+ 如果遇到账号被封禁等异常情况，可以将 go-cqhttp 同级目录下 `device.json` 文件中的 `protocol` 值由 5 改为 2，具体可参考此 [Issue](https:\u002F\u002Fgithub.com\u002FMrs4s\u002Fgo-cqhttp\u002Fissues\u002F1942)。\n\n---\n\n### 6. Telegram\n\n贡献者：[brucelt1993](https:\u002F\u002Fgithub.com\u002Fbrucelt1993)\n\n**6.1 获取 Token**\n\n申请 Telegram 机器人可以在 Google 上轻松找到相关信息，关键是要获取机器人的 Token ID。\n\n**6.2 安装依赖**\n\n```bash\npip install pyTelegramBotAPI\n```\n\n**6.3 配置**\n\n```bash\n\"channel\": {\n    \"type\": \"telegram\",\n    \"telegram\":{\n      \"bot_token\": \"YOUR BOT TOKEN ID\"\n    }\n}\n```\n---\n\n### 7. Gmail\n\n**要求：** 一台服务器和一个 Gmail 账号。\n\n**贡献者：** [Simon](https:\u002F\u002Fgithub.com\u002F413675377)\n\n按照 [官方文档](https:\u002F\u002Fsupport.google.com\u002Fmail\u002Fanswer\u002F185833?hl=en) 为您的 Google 账号创建应用专用密码，按如下方式配置，即可开始使用！！！\n\n```bash\n\"channel\": {\n    \"type\": \"gmail\",\n    \"gmail\": {\n      \"subject_keyword\": [\"bot\", \"@bot\"],\n      \"host_email\": \"xxxx@gmail.com\",\n      \"host_password\": \"GMAIL ACCESS KEY\"\n    }\n  }\n```\n---\n\n### 8. Slack\n\n**❉ 不再需要服务器或公网IP**\n\n**贡献者:** [amaoo](https:\u002F\u002Fgithub.com\u002Famaoo)\n\n**依赖项**\n\n```bash\npip3 install slack_bolt\n```\n\n**配置**\n\n```bash\n\"channel\": {\n    \"type\": \"slack\",\n    \"slack\": {\n      \"slack_bot_token\": \"xoxb-xxxx\",\n      \"slack_app_token\": \"xapp-xxxx\"\n    }\n  }\n```\n\n**设置 Bot Token 范围 - OAuth & 权限**\n\n将 Bot 用户的 OAuth Token 写入配置文件 `slack_bot_token`。\n\n```\napp_mentions:read\nchat:write\n```\n\n**启用 Socket 模式 - Socket Mode**\n\n如果您尚未创建应用级别的 Token，系统会提示您创建一个。请将生成的 Token 写入配置文件 `slack_app_token`。\n\n**事件订阅（Event Subscriptions）- 订阅机器人事件**\n\n```\napp_mention\n```\n\n**参考文档**\n\n```\nhttps:\u002F\u002Fslack.dev\u002Fbolt-python\u002Ftutorial\u002Fgetting-started\n```\n\n---\n\n### 10. 钉钉\n\n**要求：**\n\n- 企业内部开发机器人。\n\n**依赖项**\n\n```bash\npip3 install requests flask\n```\n\n**配置**\n\n```bash\n\"channel\": {\n    \"type\": \"dingtalk\",\n    \"dingtalk\": {\n      \"image_create_prefix\": [\"draw\", \"draw\", \"Draw\"],\n      \"port\": \"8081\",                  # 外部端口\n      \"dingtalk_token\": \"xx\",          # Webhook 地址的访问令牌\n      \"dingtalk_post_token\": \"xx\",     # 钉钉回传消息时头部携带的验证令牌\n      \"dingtalk_secret\": \"xx\"          # 群机器人中的安全加密签名字符串\n    }\n  }\n```\n\n**参考文档**：\n\n- [钉钉内部机器人教程](https:\u002F\u002Fopen.dingtalk.com\u002Fdocument\u002Ftutorial\u002Fcreate-a-robot#title-ufs-4gh-poh)\n- [自定义机器人接入文档](https:\u002F\u002Fopen.dingtalk.com\u002Fdocument\u002Ftutorial\u002Fcreate-a-robot#title-ufs-4gh-poh)\n- [企业内部开发机器人教程文档](https:\u002F\u002Fopen.dingtalk.com\u002Fdocument\u002Frobots\u002Fenterprise-created-chatbot)\n\n**生成机器人**\n\n地址：https:\u002F\u002Fopen-dev.dingtalk.com\u002Ffe\u002Fapp#\u002Fcorp\u002Frobot  \n添加机器人，在开发管理中设置服务器的出站 IP 和消息接收地址（即配置中的外部地址，如 https:\u002F\u002Fxx.xx.com:8081）。\n\n---\n\n### 11. 飞书\n\n**依赖项**\n\n```bash\npip3 install requests flask\n```\n\n**配置**\n\n```bash\n\"channel\": {\n    \"type\": \"feishu\",\n    \"feishu\": {\n        \"image_create_prefix\": [\n            \"draw\",\n            \"draw\",\n            \"Draw\"\n        ],\n        \"port\": \"8082\",                  # 外部端口\n        \"app_id\": \"xxx\",                 # 应用程序的 app_id\n        \"app_secret\": \"xxx\",             # 应用程序的 Secret\n        \"verification_token\": \"xxx\"      # 事件订阅的验证令牌\n    }\n}\n```\n\n**生成机器人**\n\n地址：https:\u002F\u002Fopen.feishu.cn\u002Fapp\u002F  \n1. 为企业添加一个自建应用。  \n2. 开启以下权限：  \n    - im:message  \n    - im:message.group_at_msg  \n    - im:message.group_at_msg:readonly  \n    - im:message.p2p_msg  \n    - im:message.p2p_msg:readonly  \n    - im:message:send_as_bot  \n3. 在菜单中订阅“接收消息 v2.0”事件，并配置请求地址（即配置中的外部地址，如 https:\u002F\u002Fxx.xx.com:8081）。  \n4. 在版本管理和发布中上线应用，待审核通过后，即可在群聊中使用该自建应用。\n\n---\n\n### 12. 企业微信\n\n**要求：** 一台服务器和一个已认证的企业微信账号。\n\n企业微信的 `config.json` 配置只需将类型改为 `wechat_com`，默认的消息接收服务器 URL 为：http:\u002F\u002Fip:8888\u002Fwechat。\n\n```bash\n\"channel\": {\n    \"type\": \"wechat_com\",\n    \"wechat_com\": {\n      \"wechat_token\": \"YOUR TOKEN\",            # Token 值\n      \"port\": \"8888\",                          # 程序监听的端口\n      \"app_id\": \"YOUR APP ID\",                 # 应用 ID\n      \"app_secret\": \"YOUR APP SECRET\",          # 应用 Secret\n      \"wechat_corp_id\": \"YOUR CORP ID\",\n      \"wechat_encoding_aes_key\": \"YOUR AES KEY\"\n    }\n}\n```\n\n注意：服务器 IP 必须配置到“企业可信 IP 列表”中，否则用户将无法接收到主动推送的消息。\n\n**参考文档**：\n\n- [企业微信配置教程](https:\u002F\u002Fwww.wangpc.cc\u002Fsoftware\u002Fwechat_com-chatgpt\u002F)\n\n### 通用配置\n\n+ `clear_memory_commands`: 对话中的内部命令，用于主动清除之前的记忆，字符串数组可以自定义命令别名。  \n  + 默认值：[\"#clear_memory\"]","# Bot-On-Anything 快速上手指南\n\n**Bot-On-Anything** 是一个强大的 AI 聊天机器人构建工具，支持通过轻量级配置连接多种大模型（如 ChatGPT、LinkAI）与多个应用渠道（微信、钉钉、飞书、Telegram 等），实现“一次配置，随处运行”。\n\n## 1. 环境准备\n\n### 系统要求\n支持 Linux、macOS 和 Windows 系统。\n\n### 前置依赖\n- **Python**: 必须安装，推荐版本 **3.7.1 - 3.10**。\n- **Git**: 用于克隆项目代码。\n\n> **国内加速建议**：若下载依赖较慢，可配置 pip 使用国内镜像源（如清华源）：\n> ```bash\n> pip3 install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n## 2. 安装步骤\n\n### 第一步：克隆项目\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\ncd bot-on-anything\u002F\n```\n\n### 第二步：安装依赖\n```bash\npip3 install -r requirements.txt\n```\n*注：若需使用 Web 渠道，需额外安装：`pip3 install PyJWT flask flask_socketio`；若需使用微信公众号，需安装：`pip3 install werobot`。*\n\n### 第三步：初始化配置文件\n复制模板文件生成正式配置文件：\n```bash\ncp config-template.json config.json\n```\n\n## 3. 基本使用\n\n### 配置模型与渠道\n编辑 `config.json` 文件，核心结构如下：\n\n```json\n{\n  \"model\": {\n    \"type\": \"chatgpt\",           \u002F\u002F 选择模型类型，如 chatgpt, linkai\n    \"openai\": {\n      \"api_key\": \"YOUR_API_KEY\", \u002F\u002F 填入你的 API Key\n      \"model\": \"gpt-3.5-turbo\",  \u002F\u002F 模型名称\n      \"proxy\": \"http:\u002F\u002F127.0.0.1:7890\" \u002F\u002F 如有需要配置代理\n    }\n  },\n  \"channel\": {\n    \"type\": \"terminal\",          \u002F\u002F 选择渠道类型，默认为 terminal (命令行)\n    \"terminal\": {}               \u002F\u002F 对应渠道的具体配置\n  }\n}\n```\n- **切换模型**：修改 `model.type` 及对应的配置块（如 `openai` 或 `linkai`）。\n- **切换渠道**：修改 `channel.type` 及对应的配置块（如 `wechat_mp`, `dingtalk`, `web` 等）。\n\n### 启动程序\n在项目根目录执行以下命令即可启动，默认使用命令行终端进行交互：\n\n```bash\npython3 app.py\n```\n\n启动成功后，直接在终端输入消息即可与 AI 对话。若配置了其他渠道（如 Web 或微信公众号），请根据对应渠道文档访问指定端口或 URL。","某跨国电商团队的客服主管希望将最新的 AI 大模型能力快速部署到企业微信、Slack 和官网等多个渠道，以统一处理全球用户的咨询。\n\n### 没有 bot-on-anything 时\n- **开发重复造轮子**：每接入一个新渠道（如从 Slack 扩展到钉钉），都需要重新编写一套完整的 API 对接代码和消息解析逻辑，耗时数天。\n- **模型切换成本极高**：若想从 ChatGPT 切换到 Claude 进行效果测试，必须修改多处核心代码并重新部署，无法灵活验证不同模型的回复质量。\n- **维护分散且困难**：各个渠道的机器人独立运行，配置分散在不同项目中，一旦需要更新提示词或修复漏洞，需逐个系统操作，极易遗漏。\n- **资源利用率低**：每个渠道单独调用模型接口，缺乏统一的上下文管理和并发控制，导致 Token 消耗不可控且响应速度不稳定。\n\n### 使用 bot-on-anything 后\n- **一次配置，多端运行**：只需在 `config.json` 中简单修改 `channel` 类型，即可在同一套代码基础上瞬间激活企业微信、Slack 或官网 Web 端机器人，新渠道上线缩短至小时级。\n- **模型热插拔式切换**：通过更改配置文件中的 `model.type` 字段，即可在 ChatGPT、Claude 等模型间无缝切换，无需改动任何业务代码，轻松对比不同模型的客服效果。\n- **集中化管理架构**：所有渠道共享同一套模型能力和配置中心，更新提示词或调整参数只需修改一处，立即同步至所有终端，大幅降低运维风险。\n- **架构弹性扩展**：新增模型能力可自动复用于所有已接入渠道，新增渠道也能直接调用现有模型资源，实现了真正的“模型与渠道解耦”。\n\nbot-on-anything 通过轻量化的配置驱动架构，让团队不再受困于繁琐的接口适配，真正实现了 AI 能力的“一次构建，无处不在”。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzhayujie_bot-on-anything_0443745d.png","zhayujie",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fzhayujie_b5a6ed4f.jpg","Minimalist Developer","Minimal Future Tech","zyj@zhayujie.com","https:\u002F\u002Fcowagent.ai","https:\u002F\u002Fgithub.com\u002Fzhayujie",[85,89,93,97,101,105],{"name":86,"color":87,"percentage":88},"Python","#3572A5",83.9,{"name":90,"color":91,"percentage":92},"CSS","#663399",6.5,{"name":94,"color":95,"percentage":96},"JavaScript","#f1e05a",4.4,{"name":98,"color":99,"percentage":100},"HTML","#e34c26",4,{"name":102,"color":103,"percentage":104},"Shell","#89e051",1.2,{"name":106,"color":107,"percentage":108},"Dockerfile","#384d54",0.1,4188,914,"2026-04-02T20:24:28","MIT","Linux, macOS, Windows","未说明",{"notes":116,"python":117,"dependencies":118},"该工具主要作为客户端调用外部 API（如 ChatGPT、LinkAI），而非本地运行大模型，因此无明确 GPU 和显存需求。个人订阅号渠道需注意微信后台 5 秒响应超时限制，项目虽优化至 15 秒但仍可能失败；若需监听 80 端口可能需要 sudo 权限或配置反向代理（如 nginx）。","3.7.1 - 3.10",[119,120,121,122,123],"openai>=0.27.0","werobot","PyJWT","flask","flask_socketio",[15],[126,127,128,129,130,131,132],"chatgpt","gmail","telegram","slack","web","claude","gemini","2026-03-27T02:49:30.150509","2026-04-06T07:16:15.611742",[136,141,146,151,156,161],{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},10830,"配置 Bing 模型时提示 'cannot import name ChatHubRequest from EdgeGPT' 错误怎么办？","这是 Python 版本不兼容导致的。EdgeGPT 库需要 Python 3.10 及以上版本才能正常运行。如果您使用的是 Python 3.9 或更低版本，请升级到 Python 3.10+。此外，建议在 Bing 配置中将 'jailbreak'（越狱模式）设置为 false，否则可能会报其他错误。注意：Bing 模式的回复速度通常较慢。","https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fissues\u002F341",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},10831,"QQ 上报 Event 数据到本地端口失败或收不到回复如何解决？","这通常是由于网络代理设置问题导致的。请检查您的代理软件设置，将模式更改为“分流”或“规则”模式（Rule Mode），确保本地回环地址（127.0.0.1）不走代理。如果关闭代理后能收到回复但无法访问 ChatGPT API，则必须使用分流模式，仅让国外流量走代理。","https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fissues\u002F66",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},10832,"钉钉配置中的 dingtalk_token 具体指什么？如何获取？","dingtalk_token 指的是钉钉机器人 Webhook 的 access token。配置时需要同时填写三个参数：'dingtalk_key' (AppKey)、'dingtalk_secret' (AppSecret) 和 'dingtalk_token' (webhook-access-token)。如果是单聊模式，也需要正确配置这些凭证以确保鉴权通过。","https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fissues\u002F274",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},10833,"Token 验证失败是什么原因造成的？","正常情况下，项目部署后自带 Token 验证功能，无需额外增加代码。如果出现验证失败，通常是路由配置问题。请参照腾讯官方提供的示例仔细检查您的回调地址和路由设置是否正确。","https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fissues\u002F39",{"id":157,"question_zh":158,"answer_zh":159,"source_url":160},10834,"如何将 cqhttp 部署在国内而主程序部署在国外以规避封号风险？","可以通过修改配置文件实现分离部署。在 config.yml 中自定义 cqhttp 监听的端口和上报端口。早期版本中 QQ 端口可能在 qq_channel.py 中写死为 8080，新版本已支持配置化。确保国内 cqhttp 能访问到国外部署的 bot-on-anything 服务地址即可。","https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fissues\u002F188",{"id":162,"question_zh":163,"answer_zh":164,"source_url":165},10835,"是否支持接入自己训练的私有模型？","支持。您可以尝试修改配置文件中的 model type。但需要注意，部分代码（如 open_ai_model.py）中可能硬编码了请求地址。如果配置后仍返回标准模型答案，请检查代码中是否需要根据您的私有模型 API 地址进行相应的修改，确保请求指向正确的端点。","https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fissues\u002F179",[167,172,177,182,187,192,197,202,206],{"id":168,"version":169,"summary_zh":170,"released_at":171},53265,"1.1.0","- 接入Google Bard @RegimenArsenic\n- 接入钉钉 @wujiyu115\n- 接入飞书 @wujiyu115\n- 接入企业微信 @ffwen123  @lichengzhe\n- 接入Discord @tercel\n- 支持插件化开发 @RegimenArsenic\n- 支持流式对话 @RegimenArsenic\n\n**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fzhayujie\u002Fbot-on-anything\u002Fcompare\u002F1.0.0...1.1.0","2023-04-11T15:12:18",{"id":173,"version":174,"summary_zh":175,"released_at":176},53266,"1.0.0","+ 支持新版必应 @RegimenArsenic\n+ 微信公众号使用优化 @selierlin\n+ 多渠道启动 @RegimenArsenic\n+ 微信热重载 @mouyong\n+ Slack Socket 模式 @amaoo\n+ 百度敏感词过滤 @DBinK\n+ 企业微信自动修复脚本 @mouyong\n+ 修复配置模板 @MLZC","2023-03-22T16:50:45",{"id":178,"version":179,"summary_zh":180,"released_at":181},53267,"0.0.7","特性：支持Web渠道，由@RegimenArsenic实现","2023-03-07T17:11:12",{"id":183,"version":184,"summary_zh":185,"released_at":186},53268,"0.0.6","特性：支持 ChatGPT-3.5 API","2023-03-02T06:38:33",{"id":188,"version":189,"summary_zh":190,"released_at":191},53269,"0.0.5","特性：支持 QQ 频道","2023-02-28T15:37:21",{"id":193,"version":194,"summary_zh":195,"released_at":196},53270,"0.0.4","特性：支持 Gmail 频道（由 @413675377 贡献）","2023-02-20T16:31:22",{"id":198,"version":199,"summary_zh":200,"released_at":201},53271,"0.0.3","特性：支持终端通道","2023-02-18T15:37:28",{"id":203,"version":204,"summary_zh":77,"released_at":205},53272,"0.0.2","2023-02-15T18:01:51",{"id":207,"version":208,"summary_zh":77,"released_at":209},53273,"0.0.1","2023-02-15T18:00:06"]