目 录CONTENT

文章目录
Web

CommentAI - Typecho Blog AI Intelligent Comment Moderation & Reply Plugin

zeruns
2026-03-12 / 0 Comment / 1 Like / 5 Views / 0 words / It is currently checking whether it has been included...

CommentAI - Typecho Blog AI Intelligent Comment Moderation & Reply Plugin

Introduction

CommentAI is an AI intelligent comment moderation & reply plugin for Typecho blogs.

Core Features

  • Automatically use AI to moderate user comments, move rejected comments to pending review for manual approval
  • Automatically generate comment replies
  • Three working modes available (auto-reply, manual review, suggestion only)
  • Support for Qwen, OpenAI, DeepSeek, Kimi and other model settings
  • Support for context-aware replies
  • Support for sensitive word filtering and frequency limiting
  • Support for reply delay
  • Support for trigger condition settings
  • Support for AI identifier display

Based on the CommentAI plugin developed by blogger xuan, with secondary development using AI, adding comment AI moderation functionality to the original plugin (which only had AI reply functionality).

Original plugin developer's blog post: https://blog.ybyq.wang/archives/1527.html

Open source link for the secondary developed plugin: https://github.com/zeruns/CommentAI


Installation

Environment Requirements

  • Typecho 1.2.0 - 1.3.0
  • PHP 7.0+ (requires curl, json, mbstring extensions)
  • MySQL 5.7+ or SQLite 3.0+
  • AI service API Key

Installation Steps

  1. Upload the CommentAI folder to the /usr/plugins/ directory
  2. Backend "Console" → "Plugins" → Enable "CommentAI"
  3. The plugin automatically creates database tables
  4. If creation fails, manually execute the install.sql file

Configuration

Basic Configuration

Plugin Switch

  • Enable/disable the plugin

Reply Mode

  • Fully automatic: AI generates and directly publishes
  • Manual review: requires manual approval after generation
  • Suggestion only: for reference only, not published

Administrator UID

  • User identity used for AI replies, default is 1

AI Platform Configuration

Supported Platforms

  • Alibaba Cloud Bailian: fast domestic access, affordable price
  • OpenAI: high quality, requires international network
  • DeepSeek: high cost-performance ratio
  • Kimi (Moonshot): domestic large model
  • SiliconFlow: one-stop cloud service platform integrating top large models
  • DMXAPI: Chinese multimodal large model API aggregation platform
  • Custom: support for OpenAI compatible interfaces

API Configuration

  • API Key: required, obtain from the corresponding platform
  • API Address: optional, leave blank to use default
  • Model Name: such as qwen-plus, gpt-4o-mini, deepseek-chat, moonshot-v1-8k

Prompt Configuration

System Prompt

Define the AI's role and reply style:

You are a friendly, professional blogger. Generate appropriate replies based on reader comments.

Requirements:

  1. Natural, friendly tone
  2. Provide valuable responses to comment content
  3. Give clear answers to questions
  4. Reply length 50-150 words
  5. Reply in Chinese

Context Information

  • Include article title
  • Include article summary (increases token consumption)
  • Include parent comments

Advanced Configuration

Temperature Parameter

  • 0.0-0.3: strong determinism
  • 0.4-0.7: balanced (recommended)
  • 0.8-1.0: strong creativity

Maximum Token Count

  • Recommended 200-500

Sensitive Word Filtering

  • One sensitive word per line

Frequency Limit

  • Maximum number of calls per hour, 0 for no limit

Reply Delay

  • How many seconds to delay reply, 0 for immediate reply (recommended)
  • Recommended 30-120 seconds

Display Settings

AI Identifier

  • Display: add identifier at the end of reply (recommended, customizable)
  • Do not display: looks like manual reply

Trigger Conditions

  • Only reply to approved comments (recommended)
  • Ignore spam comments (recommended)
  • Ignore quotes and Trackback (recommended)
  • Only reply to the first comment of the article
  • Automatically exclude administrator comments

AI Moderation Configuration

API service provider can be set separately, you can choose a smaller model to save money, or some free models


Usage

Workflow

  1. Reader posts a comment
  2. Plugin checks trigger conditions
  3. Triggers AI moderation
  4. Delays for specified time (if configured)
  5. Calls AI to generate reply
  6. Processes according to mode

Management Panel

Access: Backend → AI Comment Reply

Features

  • Statistics cards: display counts for each status
  • Status filtering: view replies in different statuses
  • Queue list: view detailed information
  • Operation buttons: publish, reject, regenerate, view original comment

Toolbar

  • Refresh: reload data
  • Clean up old records: delete records older than 30 days
  • Plugin settings: jump to configuration page
  • Test connection: test AI service

Comment AI moderation effect:


Uninstallation

  1. Disable the plugin in the backend
  2. Delete the plugin folder
  3. (Optional) Delete database table:
DROP TABLE IF EXISTS `typecho_comment_ai_queue`;

Github: https://github.com/zeruns/CommentAI

123 Cloud Disk: https://www.123865.com/s/2Y9Djv-5FddH?pwd=ffLm#


1
  1. Tipping via Alipay

    qrcode alipay
  2. Tipping via WeChat

    qrcode weixin

Comment Section