Wechat bot to auto reply with different ChatGPTs
run setup.sh
to install Bazel and Python dependencies
sudo ./setup.sh
update OpenAI/Microsoft ChatGPT config files in config/config
, each field defination please refer proto/config.proto
- update OPENAI ChatGPT account and network proxy information
# config/config
bot_config {
name: "openai"
chatgpt_config {
provider: OPENAI
account_info {
user_name: "your input"
password: "your input"
}
proxy: "your input"
}
trigger_keyword: "your input"
}
- update Microsoft Bing ChatGPT account cookies, could use
Cookie-Editor
(https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm?hl=en) to save, and overrideconfig/cookies.json
file
# config/config
bot_config {
name: "microsoft"
chatgpt_config {
provider: MICROSOFT
# fillin contents with your own cookies in config/cookies.json file
cookie_path: "config/cookies.json"
}
trigger_keyword: "your input"
}
Noted:
selenium
need webdriver which matches your own one, for now we provide109
,110
and110
for you choose, you could use--config chrome_109
,--config chrome_111
, default is110
selenium
different version supports different Python verions, for now we provide400
and480
,400
for Python3.6 and lower, while480
for Python3.7 and newer, you could use--config selenium_400
to choose suitable verison and default is480
- after setup, you could check whether ChatGPTs work well
bazel run //app:wechat_bot -- chatgpt_test
# eg: use selenium 400 and chrom 111 to build:
# bazel run //app:wechat_bot --config chrome_111 --config selenium_400 -- chatgpt_test
- once it can response, you can run WechatBot, then you can reply in chatroom with setted
trigger_keyword
# use firefox
bazel run //app:chatgpt_bot -- run
# use playwright
bazel run //app:chatgpt_bot -- run_v2
- add headless mode
- find a better way check chatroom contents instead of polling
- use async to reply to different chatroom
- different chatroom with fixed ChatGPT thread that could collect user favorites
revChatGPT: https://github.com/acheong08/ChatGPT
EdgeGPT: https://github.com/acheong08/EdgeGPT
WechatAutoReplyWithSelenium: https://github.com/Baoming520/WechatAutoReplyWithSeleniumgit