🍾 I Integrated AI 🤖 into My WeChat Official Account
This article was last updated on: May 17, 2026 am
Background
Recently, the explosive popularity of AI applications like DeepSeek has made me deeply aware of the enormous potential of AI technology across various domains. To better embrace AI, I decided to incorporate AI into as many aspects of my work and daily life as possible, improving both efficiency and experience.
As part of embracing AI, I chose to integrate AI capabilities into my WeChat Official Account, enabling intelligent replies to user messages and providing a richer interactive experience.
Tech Stack
This project primarily uses the following tech stack:
- Docker and Docker Compose: For containerized deployment, ensuring environment consistency; simplifying configuration and management of multi-container applications.
- Zhipu AI: Provides powerful language model support, ensuring the quality of AI responses. (The reason is that DeepSeek’s service is currently unstable, so I’m using this as a temporary alternative.)
- WeChat Official Account Platform: Serves as the integration channel for the AI application.
- Alibaba Cloud ECS: Provides a stable VM runtime environment, with security group configurations to ensure security.
- chatgpt-on-wechat: A chatbot built on large language models, supporting integration with WeChat Official Accounts, WeCom apps, Feishu, DingTalk, and more.
Step-by-Step Guide
1. Prepare the Environment
First, prepare the runtime environment on Alibaba Cloud ECS, ensuring the necessary security group rules are configured to allow access on port 80.
2. Configure Docker Compose
Write a docker-compose.yml file to configure the runtime parameters for the AI application. Key configurations are as follows:
1 | |
Compared to the original documentation:
The following configurations were adjusted:
- ZHIPU_AI_API_KEY: The Zhipu AI API Key for calling the AI model. The open_ai_api_key is intentionally left unconfigured.
- MODEL: The model name for calling the AI model.
- PROXY: The proxy address for calling the AI model. This is set to the Zhipu AI API endpoint, specifically: ‘https://open.bigmodel.cn/api/paas/v4/’
- CHARACTER_DESC: The description of the AI assistant, introducing its capabilities and expertise. The prompt here was fine-tuned based on my self-introduction on EWhisper.
- WECHATMP_APP_ID, WECHATMP_APP_SECRET, WECHATMP_AES_KEY, WECHATMP_TOKEN: WeChat Official Account configuration details for integrating with the WeChat Official Account platform.
3. WeChat Official Account Developer Configuration
Complete the application registration and configuration on the WeChat Official Account platform, obtain the necessary App ID, App Secret, and other information, and fill them into the docker-compose.yml file.
4. Start the Service
Start the service using Docker Compose:
1 | |
🐾 Note: sudo is required here because WeChat Official Account integration only supports port 80 or 443. Port 80 is used here.
Of course, for enterprise-level deployments, you can use an Nginx reverse proxy or ALB forwarding to other ports to achieve both security and high availability.
5. WeChat Official Account - Server Configuration
For details, refer to: chatgpt-on-wechat WeChat Official Account Integration Guide
│ The configuration process is as follows:
│
│ Enable the developer secret on the Official Account platform (corresponding to the wechatmp_app_secret configuration), and add the server IP to the whitelist.
│ Fill in the WeChat Official Account-related configurations in config.json as shown above, ensuring they match the settings in the Official Account backend.
│ Start the program. Once started, it will listen on port 80 (if you lack permission to listen, add sudo before the startup command; if port 80 is already in use, stop the occupying process).
│ Enable the server configuration in the Official Account backend and submit. If saved successfully, the configuration is complete. Note that the “Server URL” field must be configured in the format http://{HOST}/wx, where {HOST} can be the server’s IP or domain name.
6. Testing and Verification
Once the service is running properly, send test messages through the WeChat Official Account to verify that the AI reply functionality works correctly.
Results
After integrating AI, my WeChat Official Account gained intelligent reply capabilities, providing accurate and creative responses based on user input. The AI assistant performs particularly well on topics related to Observability, Cloud Native, and Cloud Computing, significantly enhancing the user experience.
Here’s the actual result:

Additionally, the AI assistant supports rich plugins such as role-playing and text adventures, adding fun and variety to the interactions.
Conclusion
Through this experiment, I successfully integrated AI technology into my WeChat Official Account, not only enhancing the user interaction experience but also strengthening my determination to introduce AI into more scenarios. I welcome all readers to follow my Official Account and experience the convenience and fun that AI brings firsthand!
Future Plans
The next steps are to continue optimizing and expanding the AI assistant’s capabilities to adapt to more scenarios and needs, including:
- Connecting a knowledge base to provide more detailed knowledge support;
- Integrating speech recognition and speech synthesis for smarter interactions;
- Integrating models like DeepSeek for more intelligent Q&A capabilities;
Additionally, I will soon explore more application scenarios to expand the AI assistant’s use cases, including but not limited to:
- Obsidian knowledge base AI plugin, enabling:
- Knowledge base-powered Q&A;
- Intelligent note linking;
- AI-assisted article writing
- Deploying lobe-chat, enabling:
- Knowledge base-powered Q&A;
- Rich plugins;
- Diverse AI assistants;
- Access anytime, anywhere;
- Chat history preservation
- Desktop/mobile AI assistant selection
- Operations & monitoring alerts + AI = AIOps
- Kubernetes + AI
- Programming + AI
- Linux Shell Terminal + AI
- Workflow + AI
- Smart home (Xiaomi Speaker) + AI
- …
Through practice, I aim to further appreciate the broad application prospects and value of AI across various domains.