An example of ChatGPT in Wechat.
- Prepare a wechat account that surports web api.(or you can change wechaty puppet to padchat.)
- Get an API KEY from https://beta.openai.com/account/api-keys (how to regist? it's another question.)
- Node version >= 16.
# npm i wechaty
# npm i openai
# node bot.js
If you see:
SyntaxError: Cannot use import statement outside a module
add "type": "module"
to package.json
may fix it.