← all repositories
kx-Huang/ChatGPT-on-WeChat

Turning WeChat Into a GPT-4o Hotline

A dead-simple bridge that drops GPT-4o into your WeChat DMs and group chats, deployable anywhere from Railway to Alibaba Cloud.

920 stars TypeScript Chat AssistantsAgents
ChatGPT-on-WeChat
Not currently ranked — collecting fresh signals.
star history

What it does This TypeScript bot uses the Wechaty SDK to log into your personal WeChat account and auto-reply to messages via the OpenAI API. You set a trigger keyword—or leave it blank for full auto-reply—and it routes conversations to models like gpt-4o or gpt-3.5-turbo, returning answers in private chats or group threads. It is essentially glue code between WeChat and OpenAI, with deployment templates for Railway and Alibaba Cloud ComputeNest.

The interesting bit Instead of using official WeChat Business APIs, the project piggybacks on the consumer web protocol by having you scan a QR code to authorize a “desktop” login. That keeps setup friction low, but it also means the bot inherits the brittleness of unofficial WeChat clients—a reality the README confronts directly in its troubleshooting section.

Key highlights

  • Supports gpt-4o and gpt-3.5-turbo with configurable temperature, token limits, and custom error fallback messages
  • Trigger keywords can be tuned per context: an empty string enables full auto-reply in DMs, while group chats require @bot plus the keyword
  • Includes one-click deployment buttons for Railway and Alibaba Cloud ComputeNest, plus a local Docker path
  • Exposes a ChatGPTBot.onCustimzedTask() hook in src/chatgpt.ts for adding custom message handlers

Caveats

  • The README documents a recurring AssertionError [ERR_ASSERTION]: 1 == 0 during login or self-chat, with stack traces pointing to the upstream wechat4u dependency
  • Group chat trigger rules—messages must start with @Name <keyword>—are fiddly enough to merit their own troubleshooting entry

Verdict Worth a look if you want to experiment with LLMs inside your existing WeChat social graph without spinning up a separate frontend. Avoid it if you need enterprise SLAs or guaranteed access to official WeChat APIs.

Frequently asked

What is kx-Huang/ChatGPT-on-WeChat?
A dead-simple bridge that drops GPT-4o into your WeChat DMs and group chats, deployable anywhere from Railway to Alibaba Cloud.
Is ChatGPT-on-WeChat open source?
Yes — kx-Huang/ChatGPT-on-WeChat is open source, released under the ISC license.
What language is ChatGPT-on-WeChat written in?
kx-Huang/ChatGPT-on-WeChat is primarily written in TypeScript.
How popular is ChatGPT-on-WeChat?
kx-Huang/ChatGPT-on-WeChat has 920 stars on GitHub.
Where can I find ChatGPT-on-WeChat?
kx-Huang/ChatGPT-on-WeChat is on GitHub at https://github.com/kx-Huang/ChatGPT-on-WeChat.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.