wechat gptbot
v1.5.1
一个基于Chatgpt的微信机器人,没有风险,非常稳定!
英语| 中文文档
当我根据
itchat和wechaty使用机器人时,在扫描代码登录时,我经常会遇到帐户限制的风险。请参阅#158。有没有安全的方法来使用微信机器人?这是〜
2023.07.13:介绍
plugin system以使GPTBOT具有更多可能性,并且易于扩展#46。这是第一个有趣的插件:Tiktok,尝试一下并玩得开心!还请参考文档学习用法以及如何贡献〜
支持Windows系统(将来可能基于沙箱支持Linux),并且需要同时安装Python
建议Python版本在3.8.x〜3.10.x之间,版本3.10是完美的
git clone https://github.com/iuiaoin/wechat-gptbot && cd wechat-gptbotpip install -r requirements.txtroot目录中的config.template.json包含配置模板,您需要复制模板以创建最终有效config.json
cp config.template.json config.json然后填写config.json中的配置,以下是默认配置的描述,可以根据需要自定义:
{
" openai_api_key " : " YOUR API SECRET KEY " , # Fill in your OpenAI API Key
" model " : " gpt-3.5-turbo " , # ID of the model to use, support gpt-3.5-turbo, gpt-4, gpt-4-32k etc.
" use_azure_chatgpt " : false, # Whether use Azure OpenAI API
" azure_deployment_id " : " " , # Azure model deployment name
" role_desc " : " You are a helpful assistant. " , # Role description as system prompt
" session_expired_duration " : 3600, # Session memory kept duration
" max_tokens " : 1000, # Max tokens of characters for session memory
" temperature " : 0.9, # Between 0 and 2. Higher values make the output more random, while lower values more focused
" proxy " : " 127.0.0.1:3000 " , # Proxy client ip and port
" openai_api_base " : " " , # api url used by openai service
" create_image_size " : " 256x256 " , # Dall-E image size, support 256x256, 512x512, 1024x1024
" create_image_prefix " : [ " draw " , " paint " , " imagine " ], # Text prefix for image generation
" clear_current_session_command " : " #clear session " , # Clear current session
" clear_all_sessions_command " : " #clear all sessions " , # Clear all sessions
" chat_group_session_independent " : false, # Whether sessions of users are independent in chat group
" 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
" group_chat_reply_prefix " : " " , # Reply prefix in group chat
" group_chat_reply_suffix " : " " , # Reply suffix in group chat
" single_chat_reply_prefix " : " " , # Reply prefix in single chat
" single_chat_reply_suffix " : " " , # Reply suffix in single chat
" query_key_command " : " #query key " # Querying the usage of the api key
" recent_days " : 5 # The usage in <recent_days> days
" plugins " : [{ " name " : < plugin name > , other configs }] # Add the your favorite plugins
}我们需要特定的微信版和DLL来使Windows Hook起作用。
inject dll ,您将看到“成功注入:3.2.1.121-lts.dll” python app.py瞧!享受您的探索旅程〜
非常感谢您的支持,这将是我最大的动力!
欢迎贡献,问题和功能请求!
请随时检查问题页面。
如果您喜欢这个项目,请给!
微信来自来自微信的微信 - 窗口,来自微信机器人,因此您可以不用担心使用它。还要感谢两个仓库的所有者的贡献。
成为AFDIAN的赞助商。您的名字将在慷慨的支持者下专门列出〜