Preface

DeepSeek Harness (DSH) uses a plugin-based architecture, allowing features to be extended through plugins. dsh-plugin-qq-groupmate is an open-source plugin maintained by user lilith1257. Its core purpose is to connect AI models in DeepSeek Harness to QQ groups via the OneBot 11 protocol, allowing them to participate in conversations as regular group members.

This plugin addresses the need to deploy private or persona-specific AI in QQ groups. It supports independent role and model configuration per group and provides a visual settings interface.

Feature Overview

The plugin mainly includes the following capabilities:

  • OneBot 11 Integration: Supports forward and reverse WebSocket modes, and is compatible with mainstream protocol adapters such as NapCat, SnowLuma, LLOneBot, Lagrange, and go-cqhttp.
  • Character Card System: Supports defining personas, personalities, speaking styles, and example dialogues. Compatible with SillyTavern V2 card format and native JSON format.
  • Independent Per-Group Configuration: Each group can specify its own character, model, trigger rules, and context length independently, without interfering with other groups.
  • Flexible Trigger Control: Supports responses to mentions (@), keyword prefixes, probabilistic replies, cooldown mechanisms, and also supports responding to private chat messages.
  • Context and Memory Management: Includes multi-turn context handling and long-term memory compression based on a pyramid algorithm.
  • Built-in Command System: Supports custom command prefixes, and provides features such as help, character switching, impression management, reminders, stickers, weather, and tarot.
  • Optional Image Generation: When the model outputs [生图:标签], it can automatically call a Nai2API-compatible service to generate images.
  • Optional Voice Replies: Based on local GPT-SoVITS, synthesizes Chinese or Japanese speech and supports automatically switching reference audio based on emotion.
  • Local Reliable Routing: For queries about time, date, day of the week, and similar topics, the response is handled directly by the local host without consuming model quota.
  • Visual Settings: All configurations can be modified on the DSH settings page and take effect immediately without restarting.

Installation and Activation

Before installation, ensure that DSH is installed and that pnpm is included in the system PATH (dsh plugin is a pnpm forwarder).

  1. Run the following command to install the plugin (web is the profile name; modify it according to actual usage):
dsh plugin --profile web add github:lilith1257/dsh-plugin-qq-groupmate
  1. After installation, dsh automatically packages this plugin into the profile. There is no need to manually modify configuration files; restart DSH to activate it.

  2. The commands to update or uninstall the plugin are as follows:

dsh plugin --profile web update dsh-plugin-qq-groupmate
dsh plugin --profile web remove dsh-plugin-qq-groupmate

Configuration and Integration

By default, the plugin uses reverse WebSocket mode, listening on 127.0.0.1:3001 on the local host and waiting for the protocol adapter to connect.

  1. Add the reverse WebSocket address in the network configuration of the protocol adapter (such as NapCat or SnowLuma):
ws://127.0.0.1:3001
  1. If you need to use forward WebSocket mode (where the plugin actively connects to the protocol adapter), change mode to forward on the DSH plugin settings page and enter the WebSocket address of the protocol adapter.

  2. Configuration for connection mode (mode), listening port (listenPort), WebSocket address (wsUrl), and other parameters can all be modified in the visual interface on the DSH settings page.

Character Cards and Memory

The default data directory for the plugin is ~/.dsh/qq-groupmate (that is, DSH_HOME/qq-groupmate).

  1. Character Cards: Put JSON-format character card files into the characters/ directory. The filename without the extension is the character ID. The plugin package includes a sample card at characters/default.json. SillyTavern V2 format is supported.

  2. Memory and Context: The plugin supports multi-turn context and long-term memory. Long-term memory uses a pyramid compression algorithm to reduce token consumption while retaining important information.

Optional Features

The plugin provides optional support for image generation and voice replies, but the related services must be prepared manually.

  1. Image Generation: Configure imageGen.baseUrl (service address) and imageGen.token (token) on the settings page. You need to provide a Nai2API-compatible service yourself.

  2. Voice Replies: Configure voice.endpoint (endpoint for Chinese voice synthesis, default http://127.0.0.1:9880/tts) and voice.language (language selection, supports auto/zh/ja) on the settings page. You need to provide a GPT-SoVITS service yourself.

Notes

  • Personal Project: This is a project for personal use and does not guarantee compatibility or technical support.
  • Dependency Environment: It depends on DSH being installed and pnpm being available in the PATH.
  • External Services: The image generation and voice reply features require users to set up and maintain Nai2API and GPT-SoVITS services themselves.
  • License: The knowledge/rp-hub-faq.md file included in the package is licensed under CC BY-NC 4.0.

Conclusion

dsh-plugin-qq-groupmate provides a complete solution for DeepSeek Harness to connect to QQ groups through the OneBot 11 protocol. It emphasizes configuration flexibility and independence, making it suitable for developers or users who want to deploy persona-specific AI in QQ groups.

  • Project Home: https://github.com/lilith1257/dsh-plugin-qq-groupmate
  • Community Directory: https://www.skillhub.cn/plugins/lilith1257/dsh-plugin-qq-groupmate