wechat-chatgpt
Use ChatGPT On Wechat via wechaty
An archived tool that connected ChatGPT to WeChat so you could chat with AI through your WeChat account, no longer maintained but the code is available to study or fork.
wechat-chatgpt is a tool that connects OpenAI's ChatGPT to WeChat, the widely used Chinese messaging app, so that you can chat with the AI through your WeChat account. The first thing the README makes clear is that the project has been archived, meaning its author has stopped actively working on it and is no longer adding features or fixes. Anyone considering it should keep that in mind.
The way it works is that the program logs into WeChat on your behalf using a library called wechaty, then forwards messages to ChatGPT through OpenAI's official interface and sends the replies back. To run it you need your own OpenAI API key, which is a paid credential from OpenAI, and you choose which model to use. Beyond plain text chat, the README says it can also work with DALL-E for image generation and Whisper for audio, let you set a custom prompt that shapes the AI's personality, and respond to a few typed commands such as showing help, setting a prompt, or clearing past conversation.
Most of the README is a set of deployment guides aimed at people who are comfortable with some setup. It offers several options: free hosting platforms Railway and Fly.io, self-hosting with Docker or Docker Compose, and running it directly with Node.js. In each case you log into WeChat by scanning a QR code that appears in the program's logs.
There is also a reference table of configuration settings you can adjust through environment variables, such as the model, the response randomness, keywords that trigger replies in private or group chats, and lists of blocked words. The README additionally points to a companion project for routing requests through a custom API endpoint. The code is released under the ISC license, a permissive open-source license.
Where it fits
- Study how to connect a messaging platform to a third-party AI API as a reference architecture.
- Fork the archived code as a starting point for a similar WeChat or messaging-app bot project.
- Use the Docker Compose setup as a template for deploying a Node.js bot with environment variable configuration.