{"id":13642391,"url":"https://github.com/iuiaoin/wechat-gptbot","last_synced_at":"2025-04-04T10:07:46.323Z","repository":{"id":170547949,"uuid":"646651667","full_name":"iuiaoin/wechat-gptbot","owner":"iuiaoin","description":"A wechat robot based on ChatGPT with no risk, very stable! 🚀","archived":false,"fork":false,"pushed_at":"2023-12-15T08:45:48.000Z","size":1182,"stargazers_count":612,"open_issues_count":51,"forks_count":117,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-28T09:06:50.266Z","etag":null,"topics":["chatgpt","openai","python","wechat"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iuiaoin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-29T03:07:38.000Z","updated_at":"2025-03-12T09:54:48.000Z","dependencies_parsed_at":"2024-01-14T09:32:54.222Z","dependency_job_id":"9fb87411-2425-4b80-8f80-ba1bbd6be5cd","html_url":"https://github.com/iuiaoin/wechat-gptbot","commit_stats":null,"previous_names":["iuiaoin/wechat-gptbot"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iuiaoin%2Fwechat-gptbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iuiaoin%2Fwechat-gptbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iuiaoin%2Fwechat-gptbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iuiaoin%2Fwechat-gptbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iuiaoin","download_url":"https://codeload.github.com/iuiaoin/wechat-gptbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157273,"owners_count":20893219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","openai","python","wechat"],"created_at":"2024-08-02T01:01:30.819Z","updated_at":"2025-04-04T10:07:46.304Z","avatar_url":"https://github.com/iuiaoin.png","language":"Python","funding_links":[],"categories":["Chatbots"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eWelcome to wechat-gptbot 👋\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"200\" src=\"https://cdn.jsdelivr.net/gh/iuiaoin-bot/images@main/uPic/SHCzIa.png\"\u003e\n\u003c/div\u003e\n\u003cp\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000\" /\u003e\n  \u003ca href=\"#\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-green.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.python.org/\"\u003e\n    \u003cimg\n      alt=\"Python Version\"\n      src=\"https://img.shields.io/badge/python-%20%3E%3D%203.8-brightgreen\"\n    /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/BerriAI/litellm\"\u003e\n    \u003cimg\n      alt=\"litellm\"\n      src=\"https://img.shields.io/badge/%20%F0%9F%9A%85%20liteLLM-OpenAI%7CAzure%7CAnthropic%7CPalm%7CCohere-blue?color=green\"\n    /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e A wechat robot based on ChatGPT with no risk, very stable! 🚀  \n\u003e English | [中文文档](README_ZH.md)\n\n## 🎤 Introduction\n\n\u003e When I use bots based on `itchat` and `wechaty`, I often encounter the risk of account restrictions when scanning codes to log in. Refer to [#158](https://github.com/AutumnWhj/ChatGPT-wechat-bot/issues/158). Is there a safe way to use wechat bots? Here it is~\n\n## 🌟 Features\n\n- [x] **Extremely Stable：** Implement based on windows hook, no worry about risk of wechat account restriction\n- [x] **Basic Conversation：** Smart reply for private chat and group chat, support multiple rounds of session context memory, support GPT-3, GPT-3.5, GPT-4, Claude-2, Claude Instant-1, Command Nightly, Palm models and other models in [litellm](https://litellm.readthedocs.io/en/latest/supported/)\n- [x] **Image Generation：** Support image generation, Dell-E only model for now\n- [x] **Flexible Configuration：** Support prompt settings, proxy, command settings and etc.\n- [x] **Plugin System：** Support personalized plugin extensions, you can easily integrate the functions you want\n\n## 📝 Changelog\n\n\u003e **2023.07.13：** Introduce `plugin system` to make gptbot have more possibilities and easy to expand [#46](https://github.com/iuiaoin/wechat-gptbot/pull/46). Here's the first interesting plugin: [tiktok](https://github.com/iuiaoin/plugin_tiktok), try it and have fun! Also refer to [docs](plugins/README.md) to learn the usage and how to contribute~\n\n## 🚀 Getting Start\n\n### Environment\n\nSupport Windows system(probably support Linux in the future based on [sandbox](https://github.com/huan/docker-wechat)) and `Python` needs to be installed at the same time\n\n\u003e It is recommended that the Python version be between 3.8.X~3.10.X, version 3.10 is perfect\n\n#### 1. Clone repo\n\n```bash\ngit clone https://github.com/iuiaoin/wechat-gptbot \u0026\u0026 cd wechat-gptbot\n```\n\n#### 2. Install dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### Configuration\n\n`config.template.json` in the root directory contains the configs template, you need to copy the template to create the final effective `config.json`\n\n```bash\n  cp config.template.json config.json\n```\n\nThen fill in the configuration in `config.json`, the following is the description of the default configuration, which can be customized according to the needs:\n\n```bash\n{\n  \"openai_api_key\": \"YOUR API SECRET KEY\",             # Fill in your OpenAI API Key\n  \"model\": \"gpt-3.5-turbo\",                            # ID of the model to use, support gpt-3.5-turbo, gpt-4, gpt-4-32k etc.\n  \"use_azure_chatgpt\": false,                          # Whether use Azure OpenAI API\n  \"azure_deployment_id\": \"\",                           # Azure model deployment name\n  \"role_desc\": \"You are a helpful assistant.\",         # Role description as system prompt\n  \"session_expired_duration\": 3600,                    # Session memory kept duration\n  \"max_tokens\": 1000,                                  # Max tokens of characters for session memory\n  \"temperature\": 0.9,                                  # Between 0 and 2. Higher values make the output more random, while lower values more focused\n  \"proxy\": \"127.0.0.1:3000\",                           # Proxy client ip and port\n  \"openai_api_base\": \"\",                               # api url used by openai service\n  \"create_image_size\": \"256x256\",                      # Dall-E image size, support 256x256, 512x512, 1024x1024\n  \"create_image_prefix\": [\"draw\", \"paint\", \"imagine\"], # Text prefix for image generation\n  \"clear_current_session_command\": \"#clear session\",   # Clear current session\n  \"clear_all_sessions_command\": \"#clear all sessions\", # Clear all sessions\n  \"chat_group_session_independent\": false,             # Whether sessions of users are independent in chat group\n  \"single_chat_prefix\": [\"bot\", \"@bot\"],               # Start conversation with \"bot\" or \"@bot\" in single chat to trigger the bot, leave it empty if you wanna make the bot active all the time\n  \"group_chat_reply_prefix\": \"\",                       # Reply prefix in group chat\n  \"group_chat_reply_suffix\": \"\",                       # Reply suffix in group chat\n  \"single_chat_reply_prefix\": \"\",                      # Reply prefix in single chat\n  \"single_chat_reply_suffix\": \"\",                      # Reply suffix in single chat\n  \"query_key_command\": \"#query key\"                    # Querying the usage of the api key\n  \"recent_days\": 5                                     # The usage in \u003crecent_days\u003e days\n  \"plugins\": [{ \"name\": \u003cplugin name\u003e, other configs }]# Add the your favorite plugins\n}\n```\n\n### Running\n\n#### 1. Prepare\n\n\u003e We need the specific wechat version and dll to make windows hook work.\n\n1. Download assets from the [release](https://github.com/iuiaoin/wechat-gptbot/releases/tag/v1.0.0)\n2. Install WeChatSetup-3.2.1.121.exe and login\n3. Run the wechat-dll-injectorV1.0.3.exe\n4. Select 3.2.1.121-LTS.dll and click `inject dll`, you will see \"Successfully injected: 3.2.1.121-LTS.dll\"\n\n#### 2. Run command\n\n```bash\npython app.py\n```\n\n\u003cimg width=\"1440\" src=\"https://cdn.jsdelivr.net/gh/iuiaoin-bot/images@main/uPic/9JUJGz.png\"\u003e\n\nVoilà! Enjoy your exploring journey~\n\n## ✨ Generous Backers\n\n\u003e Thank you very much for your support, it will be my biggest motivation!\n\n\u003ca href=\"https://afdian.net/a/declan\"\u003e\n  \u003cimg src=\"https://cdn.jsdelivr.net/gh/iuiaoin-bot/images@main/uPic/omuyk9.svg\" /\u003e\n\u003c/a\u003e\n\n## 🤝 Contributing\n\nContributions, issues and feature requests are welcome!\u003cbr /\u003eFeel free to\ncheck [issues page](https://github.com/iuiaoin/wechat-gptbot/issues).\n\n## 🙏 Show your support\n\nGive a ⭐️ if you like this project!\n\n## 📢 Announcements\n\nThe WeChatSetup is coming from [wechat-windows-versions](https://github.com/tom-snow/wechat-windows-versions/releases) and wechat-dll-injector from [wechat-bot](https://github.com/cixingguangming55555/wechat-bot), so you can use it without concern. Also thanks the two repo's owners for their contributions.\n\n## 💖 Sponsor\n\n\u003e Become a Sponsor on **[AFDIAN](https://afdian.net/a/declan)**. Your name will be specifically listed under Generous Backers~\n\n\u003ca href=\"https://afdian.net/a/declan\"\u003e\n  \u003cimg width=\"300\" src=\"https://cdn.jsdelivr.net/gh/iuiaoin-bot/images@main/uPic/tc1DLG.jpeg\" /\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiuiaoin%2Fwechat-gptbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiuiaoin%2Fwechat-gptbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiuiaoin%2Fwechat-gptbot/lists"}