Get a WeChat robot
🤖 based on ChatGPT in a few step. 中文文档 | English
{
// Fill up with OPENAI_API_KEY
OPENAI_API_KEY: '',
// Setting the number of retries when API error occurs
retryTimes: 3,
// Setting keyword to wake up in group chat
groupKey: '',
// Setting keyword to wake up in private chat
privateKey: '',
// Setting keyword to reset context
resetKey: 'reset',
// Enabling auto replies from ChatGPT
autoReply: true,
// Using regular expression to automatically pass friends verification
friendShipRule: /chatgpt|chat/,
// Using reply mode in group chat
groupReplyMode: true,
// Using reply mode in private chat
privateReplyMode: false,
}
Now, you should fill your Token value into the OPENAI_API_KEY
in the directory src/config.js
, then run this project on local.
If necessary, configure other customization variables in src/config.js
.
// install dependencies
npm i
// start:
// dev
npm run dev
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.
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.
This package is ESM-only. It supports: Node.js >= 16.8
how to get all response? you can say "continue".
// ubuntu
sudo apt-get install chromium-browser
sudo apt-get install ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
Welcome to contribute your code and ideas