ashinnotfound/ChatGPT-YourChatRobot

❤开箱即用❤an unofficial implement of ChatGPT in QQ/Wechat. 一个非官方的ChatGPT腾讯qq/微信(非公众号)实现版,快来把你的qq或微信变成chatgpt吧

What it solves

It gives people who cannot easily use ChatGPT a way to interact with it through everyday messaging apps. The project turns a QQ account or a WeChat account into a chatbot that can hold text conversations, generate images, and reply with synthesized voice, all without needing a custom app.

How it works

The bot logs into either QQ (using the Mirai framework) or WeChat (using the itchat4j-uos library). It listens for incoming messages, sends them to the OpenAI API (via the openai-java library), and then posts the AI's response back into the chat. For image generation, it calls the DALL-E model's generation method. For voice replies, it uses the TTS model to convert text answers into audio files.

The project is configured through an application.yml file. You set your OpenAI API key(s), choose a chat model (default gpt-3.5-turbo), and optionally add a proxy because the API may be blocked in some regions. You can also set a "basic prompt" to give the bot a personality, use multiple API keys to distribute load, and define custom keywords for resetting the conversation, triggering image generation, or requesting voice replies.

Who it's for

It is aimed at individuals who want a free, self-hosted way to access ChatGPT through QQ or WeChat, especially those in regions where direct access is blocked. It is also useful for developers who want to extend or customize a chatbot without building one from scratch. The project is community-maintained by a student, so it is practical but not enterprise-grade.

Highlights

  • Works on both QQ and WeChat (WeChat lacks voice replies and quote replies)
  • Supports text chat with GPT-3.5/GPT-4 models
  • AI drawing using DALL-E-3 (returns an image URL on WeChat)
  • AI voice replies using TTS models (QQ only)
  • Multiple API keys can be configured to avoid rate limits
  • Customizable reset command, image command, and voice command
  • Supports third-party GPT services by changing the baseUrl
  • Plug-and-play: clone, configure, and run
  • Open-source and community-driven

Related

  • Project
  • Project
  • Project
  • Project