一個基於Chatgpt的微信機器人,沒有風險,非常穩定!
英語| 中文文檔
When I use bots based on
itchatandwechaty, I often encounter the risk of account restrictions when scanning codes to log in. Refer to #158.有沒有安全的方法來使用微信機器人?這是〜
2023.07.13: Introduce
plugin systemto make gptbot have more possibilities and easy to expand #46.這是第一個有趣的插件:Tiktok,嘗試一下並玩得開心!還請參考文檔學習用法以及如何貢獻〜
Support Windows system(probably support Linux in the future based on sandbox) and Python needs to be installed at the same time
建議Python版本在3.8.x〜3.10.x之間,版本3.10是完美的
git clone https://github.com/iuiaoin/wechat-gptbot && cd wechat-gptbotpip install -r requirements.txtconfig.template.json in the root directory contains the configs template, you need to copy the template to create the final effective config.json
cp config.template.json config.json Then fill in the configuration in config.json , the following is the description of the default configuration, which can be customized according to the needs:
{
" 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 , you will see "Successfully injected: 3.2.1.121-LTS.dll" python app.py瞧!享受您的探索旅程〜
非常感謝您的支持,這將是我最大的動力!
歡迎貢獻,問題和功能請求!
請隨時檢查問題頁面。
如果您喜歡這個項目,請給!
微信來自來自微信的微信 - 窗口,來自微信機器人,因此您可以不用擔心使用它。還要感謝兩個倉庫的所有者的貢獻。
Become a Sponsor on AFDIAN .您的名字將在慷慨的支持者下專門列出〜