ChatGPT webchart bot is a WeChat assistant based on NodeJS and webchaty. This tool is more convenient for you to use ChatGPT, you just chat with it as a good friend or a housekeeper.
- can reply message when metioning your bot in room(group) AutumnWhj#5
- use docker to deploy wechat bot project AutumnWhj#9
// build
docker build --pull --rm -f "Dockerfile" -t wechatbot:latest "."
// run, and then you will see some logs
docker run --name wechatbot wechatbot:latest
- If your WeChat cannot log in
Please check the root directory of your project, whether there is a file —— WechatEveryDay.memory-card
, if so, please delete it and try it again.
- support env
"engines": { "node": ">=16", "npm": ">=7" }
- Firstly, you should have an OpenAI account, then follow the steps below to get your token.
Refer to this article: https://github.com/transitive-bullshit/chatgpt-api.
To get a session token:
- Go to https://chat.openai.com/chat and log in or sign up.
- Open dev tools.
- Open Application > Cookies.
- Copy the value for __Secure-next-auth.session-token and save it to your environment.
- Now, you should fill your Token value into the
ChatGPTSessionToken
in the directorysrc/index.js
, then run this project on local.
// install dependencies
npm i
// start:
// dev
npm run dev
//or
// build
npm run build
// run lib
node lib/bundle.esm.js
- you can see your logs, and scan qrcode to log in wechat.
- Send a message to your WeChat and you will receive a reply from ChatGPT.