OpenAI/ChatGPT + Wechaty for wechat robot, add magic word to protect
Install latest nodejs >= 18 from here and Google chrome browser(to support wechaty-puppet-wechat
), clone the repo to local.
git clone https://github.com/gfl94/Chatbot004.git && cd Chatbot004
npm install
Generate OPENAI
open keys from OpenAI page
cp .env.example .env
And copy you OpenAI api key to .env
file.
OPENAI_API_KEY="sk-xxxx"
Run the program and scan your QR code with your wechat.
npm start
demo_all.mp4
- send the whole sentence to ChatGPT, and send back the response
- add
magic_word
in your chat to avoid too many noise, when the message received contains themagic_word
, then send to ChatGPT - manage your
magic_word
with login account - [23/03/26 update] add speech support.
- 项目中使用的 Wechaty 由于其项目本身原因,有被微信封号的风险,请在明确风险的情况下使用!!!