- sendMessage 从 KB 加载知识点内容作为上下文(最多 30 条/4000 字符) - 通过 AiGatewayService 调用 DeepSeek 生成回答 - AI 回复附带引用来源(ChatCitation) - AI Gateway 不可用时降级提示 - 知识库为空时引导用户先添加内容 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Same issue as KnowledgeBaseService — NestJS can't resolve ContentSafetyService in RagChatModule without @Optional(). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- ChatSession/ChatMessage/ChatCitation Prisma models - CAPI: create/list sessions, send message, get history, delete - Admin AAPI: view user sessions and messages - Content safety integration on user input - Placeholder RAG pipeline (real pipeline in M3) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>