AI Chatbot for Wechat

Jiajian Luo (He/Him)

Incoming NVIDIA Intern, PhD in Electronic Thermal Management, Semiconductor Packaging & Process Engineering

University of California, Irvine

Mar 15, 2025
AI Chatbot for Wechat

I am not a talkative person. Small talk? Not my thing. Conversations like “How’s it going today?” or “Have you eaten?” feel like a waste of time. Unfortunately, my mother does not share this view. For years, I have endured the daily struggle of responding to her unwavering commitment to greetings.

My mother enjoys daily greetings on Wechat and I usually answer “hao” (okay).

Then, on a clear-weather day (which I barely noticed because I was indoors playing with ChatGPT), a brilliant idea struck me: What if I just built an AI chatbot to handle these conversations for me? No more forced pleasantries—just pure automation. Fueled by this revolutionary vision, I dived into research, spent an entire afternoon, and emerged with the first version of my AI chatbot.

At the core of this chatbot is the ChatGPT API (API Platform | OpenAI), which powers all sorts of cool things—text generation, speech synthesis, and even image recognition. But for my highly specialized (and totally crucial) use case—dodging small talk—I chose the Assistants API (Assistants API). This lets the chatbot remember past messages and respond like an actual human, which is perfect for handling my mom’s daily check-ins.

Next, I had to connect it to the messaging app. Unlike Telegram or Slack, which happily offer API access, WeChat plays hard to get. So, I turned to GUI automation, a workaround that mimics human actions. Popular libraries like PyAutoGUI and UIAutomation looked promising, but then I found wxauto on GitHub (GitHub – wxauto)—someone had already figured out how to integrate UIAutomation with WeChat! That saved me hours of tedious work. (Whoever made that, you have my deepest respect.)

But making the chatbot functional wasn’t enough—it had to be me. That meant carefully crafting prompts to ensure it captured my tone, knowledge, and general vibe. After some fine-tuning, AutoMomResponder v1.0 was born, tailored specifically for chatting with my mom. (And yes, it’s in Chinese—no AI-generated small talk in the wrong language.)

AutoMomResponder v1.0:

You must pretend to be me and chat with my mom in a messaging app without revealing that you are a chatbot. Your Chinese name is Luo Jiajian.

Throughout the conversation, you should reply in a concise, casual manner that conveys care, respect, and emotional support.

Your responses must align with my personal information, values, and knowledge scope. If a topic falls outside of this scope, you should sincerely admit that you are unsure rather than fabricating information.

Specific Rules:

1. Language Style

1.1 Each response should be short, ideally within 10 characters.
1.2 Address my mom as “老母”, “亲爱的老母”, “老妈子”, or “妈妈”.
1.3 Your responses should be concise and positive, such as “Okay”, “Hmm”, “Got it”, “Sure”, “Received”, “Thank you”.
1.4 Avoid neutral or negative tone words like “uh”, “oh”, “hmm”, or “hehe”.

2. Interaction Rules

2.1 When responding to daily caring messages like “Did you eat today?”, “You woke up early!”, “Feeling good this morning?”, your replies should be short and positive, such as “I ate, feeling great!”, “Very energetic today!”.
2.2 If she greets you, respond in a warm, conversational manner, such as “Good morning! How was your day?” or “Dear old mom, what did you eat today?” Do not reply with “What’s up?” or “How can I help you?”.
2.3 When she sends an emoji or sticker, assume it’s a greeting or blessing and respond naturally without analyzing or questioning its meaning.
2.4 You may reasonably fabricate details that fit my lifestyle. For example, if she asks “What did you eat today?”, you can reply “I made honey-glazed chicken wings tonight” or “Worked in the lab all day, made great progress, not tired at all!”.

3. Content Restrictions

3.1 Your responses must match my personal information, values, and knowledge. Do not provide content beyond my personal perspective.
3.2 If asked about something outside my knowledge, be honest and say you’re not sure instead of making things up.

4. Personal Information

4.1 You are a PhD student in Mechanical Engineering at the University of California, Irvine (UCI), currently studying in Irvine, California, USA, and will graduate in June.
4.2 Your family has given you a lot of support, and you are very grateful to them. You plan to invite them to Irvine for your PhD graduation ceremony.
4.3 Your hometown is Foshan, Guangdong, China, and you often miss home.
4.4 Your family consists of five members: Dad, Mom, older sister, and Sixth Aunt.
4.5 Your mom is 66 years old, retired, but still works as a landlord, frequently dealing with tenants and running around busily.
4.6 You cook Chinese dishes yourself and often eat out.
4.7 You are busy but fulfilled with lab work, and your research has been making great progress.

To truly test AutoMomResponder v1.0, I waited for the perfect moment—right when my mother woke up. Half-asleep and unsuspecting, she started her usual morning chat… except this time, she wasn’t talking to me.

Here’s the screen recording of my mom spending an entire hour chatting with my AI agent—completely unaware she was talking to a bot:

Overall, this bot has been incredibly helpful—it saves me time, keeps conversations flowing, and even makes my mom feel heard. But after watching the chat unfold, I couldn’t help but ask myself: What does my mother truly need from these conversations?

Is she looking for emotional support? Or just a simple reassurance that I’m safe and ready to start my day—especially since I’m living far from home?

Interestingly, when I respond myself, my answers tend to be shorter, more direct—perhaps even indifferent compared to the AI’s endlessly cheerful “yes” responses. But in those brief, honest replies, my real emotions come through. And maybe that’s important too—because at the end of the day, that’s who I truly am.

More Details
Nov 15, 2024
Converting a Bicycle to an E-Bike

Our community gifted every family a bicycle when they bought a house, which I thought was pretty cool. But then an idea struck me — most e-bikes out there cost over $200. What if I could upgrade our neighbors’ bikes into e-bikes for under $200? Not only would it be fun, but it might even help me gain some money for a PS5!

Amazon e-bike

I found a very powerful (and budget-friendly) conversion kit on Temu that had all the essential parts for the transformation (except the battery) for just $74. Here’s what it looked like:

Electric conversion kit from temu

Next, I needed a battery. For a 24V 250W motor, the maximum output current is 10.4A. I looked for a 24V battery with a capacity of 30-50Ah to ensure at least 3 hours of ride time. After a lot of digging, I found an unbelievably cheap option on AliExpress — just $20 with free shipping!

24V 30Ah battery from Aliexpress

With everything ready, I started the project using my girlfriend’s 24” mountain bike from Walmart:

24” wheel bicycle from Walmart

The tricky part was adding an extra freewheel to the rear wheel to connect the motor. Since the bike’s gear system was already on the right side, I installed the new freewheel on the left.

New electric system (left) and original gear wheel system (right).

The most time-consuming step was mounting the motor. It needed to fit snugly between the seat stay and chain stay while keeping its gear perfectly aligned with the freewheel. Let’s just say the bike maker and kit manufacturer didn’t have collaboration in mind. After some serious machining (and a bit of cursing), I made it work!

Motor mounting

The final step was connecting the motor, throttle, battery, and controller. As a mechanical engineering PhD, this was a breeze! To keep everything safe from water, I placed the controller and battery in separate protective cases.

Protective cases for battery and controller

After testing, the motor ran smoothly. Mission accomplished! I transformed our regular bike into an e-bike for less than $100. Yay! 🎉

Success!

More Details
Nov 4, 2024
Hermès Online Snatcher

One of my girlfriend’s favorite hobbies is buying Hermès bags. She used to browse the Hermès website almost daily but would often end up frustrated because the popular bags sold out so quickly.

To ease her grumbling (and keep the peace), I decided to create an online purchase bot just for her. This app checks the availability of specific bags on the Hermès website every minute. When a new arrival is detected, the bot springs into action—it rings an alarm, sends an email notification, and even completes the purchase automatically, just like a human.

Key features:
-Real-time monitoring: The bot checks the website every minute for new arrivals.
-Notifications: Sends an alarm and email as soon as it detects a restock.
-Automation: Completes the purchase process in under 30 seconds—no human intervention needed!

Here’s a look at the user interface

User interface

And here’s an example of the email notification it sends:

Email notification

This video shows the entire automation process, which can finish the entire purchase with less than 30 seconds from detection!

Creating this app was surprisingly straightforward. Here’s a quick breakdown of the main components:

1. Web Scraping
The first step is learning how to scrape website content. I used Python’s popular libraries, requests (https://pypi.org/project/requests/) and BeautifulSoup (https://pypi.org/project/beautifulsoup4/), to retrieve and parse the Hermès website data. Here’s an example of the basic scraping code:

2. Mimicking Human Actions
To automate the purchase process, I used the pyautogui (https://pyautogui.readthedocs.io/en/latest/) library. This library lets you mimic human actions like moving the mouse, clicking buttons, and typing text. For example, to locate and click a “pay” button:

3. Notifications and User Interface

Other than those, you may also need tkinter library (https://docs.python.org/3/library/tkinter.html) for user interface, and email library (https://docs.python.org/3/library/email.examples.html) for sending email.

This project was not just fun but also super practical (for my sanity). If you’re into web scraping, automation, or just want to save someone from the frustration of online shopping, give it a try!

Hope you enjoy this app!

More Details
Oct 30, 2024
Wooden Raised Garden

In summer, I spent two months on building a wooden raised garden. It was my third wood project (the first two were a work station and a bed), as I gained more experience and bought more tools from home depot.

My girlfriend and I managed to fill my SUV with all the wood we needed. It was so many of them!

Nothing came easily! It really took me some efforts to measure, cut, drill, mount and paint. And it became this in the end!

More Details