Files
plugin-comment-ai-autopilot/docs/guide/sentiment.md
T
sunny-335 c3e003a572 feat: streamline dashboard, fix docs, optimize UI width
- Remove AI角色 quick action, keep only 回复日志/插件设置/刷新数据
- Fix LogsView filter/batch bar width to match content area (mx-4 mt-2 -> m-4 mb-0)
- Fix docs: Halo version 2.23->2.25, GitHub link nxxy335->sunny-335, Cravatar link, variable name {{conversation}}->{{conversation_history}}
- Add missing settings docs (maxConversationRounds, rateLimitPerMinute, enabledPresets)
- Update README: remove version display, update changelog
- Update version to 1.0.0-beta.2-r8k4n2
2026-06-17 22:03:35 +08:00

32 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 情感分析
情感分析功能会自动分析评论的情感倾向,并根据分析结果调整AI回复的语气。
## 情感分类
| 分类 | 说明 | AI回复语气 |
|------|------|-----------|
| 正面 | 评论情绪积极、友好、感谢 | 热情友好,表达感谢和共鸣 |
| 中性 | 评论情绪平淡、普通提问 | 正常语气回复,不加额外提示 |
| 负面 | 评论情绪偏消极、不满、批评 | 理性温和,避免激化矛盾 |
## 工作原理
1. 评论通过过滤检查后,调用AI对评论内容进行情感分析
2. AI 使用结构化输出(`OutputSpec.choice`)返回情感分类结果(POSITIVE / NEUTRAL / NEGATIVE
3. 如果情感分析失败(如AI不可用),默认降级为 NEUTRAL
4. 情感结果传入 PromptBuilder,在生成Prompt时追加对应的语气提示
5. 情感结果同时记录在 `AiCommentReply``sentiment` 字段中
## 日志展示
在AI回复日志页面,每条记录会显示情感标签:
- 🟢 **正面** — 绿色标签
-**中性** — 灰色标签
- 🔴 **负面** — 红色标签
## 性能影响
情感分析会额外调用一次AI,如果对性能有顾虑,可以在代码中禁用此功能。