MerCry
aa02ab79d2
feat(AC-AISVC-93): 完整流程测试12步执行时间线与步骤详情
...
改进内容:
- 每个步骤添加详细的input_data和output_data
- InputScanner: 显示用户输入文本
- FlowEngine: 显示会话ID和流程名称
- IntentRouter: 显示查询和匹配结果
- QueryRewriter: 显示查询和重写状态
- MultiKBRetrieval: 显示查询、top_k、命中数、最高分、top_hits详情
- PromptBuilder: 显示模板ID、行为规则、prompt预览
- LLMGenerate: 显示模型名称(deepseek-chat)、回复长度、回复预览
- OutputFilter: 显示文本长度、是否过滤、触发词
- Confidence: 显示回复长度、命中数、置信度、是否转人工
- Memory: 显示会话ID、保存状态
- Response: 显示置信度、是否转人工、回复预览
修复问题:
- OrchestratorService没有返回execution_steps
- 前端字段名与后端不一致(camelCase vs snake_case)
- RetrievalResult.evidence -> RetrievalResult.hits
- LLM模型名称显示unknown -> 显示实际模型名称
2026-02-28 14:01:15 +08:00
MerCry
6b21ba8351
feat(v0.7.0): 验收通过 - Dashboard统计增强、流程测试、对话追踪
...
验收通过的标准:
- AC-ASA-59~64: 前端话术流程和护栏监控功能验收
- AC-AISVC-91~95: Dashboard统计增强和完整流程测试验收
- AC-AISVC-108~110: 对话追踪和导出功能验收
修复问题:
- flow_test.py: 修复OrchestratorService导入和调用
- 前后端字段不一致: orderstep_no, wait_for_inputwait_input
- 数据库迁移: 添加chat_messages缺失的监控字段
新增文件:
- ai-service/app/api/admin/flow_test.py
- ai-service/scripts/migrations/add_chat_message_fields.py
- ai-service-admin/src/views/admin/prompt-template/components/VariableManager.vue
2026-02-28 12:52:50 +08:00
MerCry
a9d1079294
fix: 修复编排器使用错误的LLM配置问题 [AC-AISVC-50]
...
- 移除编排器中硬编码的LLMConfig创建
- 让LLM客户端使用自己的默认配置(从LLMConfigManager获取)
- 修复流式生成方法同样的问题
2026-02-26 19:58:55 +08:00
MerCry
f631f1dea0
feat: 统一提示词模板并添加全量提示词日志 [AC-AISVC-02, AC-ASA-19, AC-ASA-20]
...
PR Check (SDD Full Gate) / sdd-full-gate (pull_request) Successful in 2s
Details
- 新增 prompts.py 集中管理系统提示词和证据格式化
- orchestrator.py 添加全量提示词日志打印
- openai_client.py 添加全量提示词日志打印(支持普通和流式)
- rag.py 重构使用统一的提示词模板
2026-02-26 01:12:01 +08:00
MerCry
dd74ae2585
feat: 切换到优化检索器并增强编排日志 [AC-AISVC-02, AC-AISVC-16]
2026-02-25 23:45:34 +08:00
MerCry
cee884d9a0
feat: RAG 检索优化,实现多维度向量存储和 Nomic 嵌入提供者 [AC-AISVC-16, AC-AISVC-29]
2026-02-25 23:10:12 +08:00
MerCry
6d54030e0d
feat(ai-service): implement complete Orchestrator generation pipeline for T3.4 [AC-AISVC-01, AC-AISVC-02]
...
- Integrate Memory, ContextMerger, Retriever, LLMClient, ConfidenceCalculator
- Implement 8-step generation pipeline:
1. Load local history from Memory
2. Merge with external history (dedup + truncate)
3. RAG retrieval (optional)
4. Build prompt with context and evidence
5. LLM generation
6. Calculate confidence
7. Save messages to Memory
8. Return ChatResponse
- Add GenerationContext dataclass for tracking intermediate results
- Implement fallback response mechanism for error handling
- Add 21 unit tests for OrchestratorService
- All 138 tests passing
2026-02-24 13:47:12 +08:00
MerCry
550d0d8498
feat(ai-service): implement context merging for T3.2 [AC-AISVC-14, AC-AISVC-15]
...
- Add ContextMerger class for combining local and external history
- Implement message fingerprint computation (SHA256 hash)
- Implement deduplication: local history takes priority
- Implement token-based truncation using tiktoken
- Add comprehensive unit tests (20 test cases)
2026-02-24 13:26:37 +08:00
MerCry
0a167d69f0
feat(ai-service): implement LLM Adapter for T3.1 [AC-AISVC-02, AC-AISVC-06]
...
- Add LLMClient abstract base class with generate/stream_generate interfaces
- Implement OpenAIClient with httpx for OpenAI-compatible API calls
- Add retry logic with tenacity for timeout handling
- Support both non-streaming and streaming generation
- Add comprehensive unit tests for LLM Adapter
- Fix entities.py JSON column type for SQLModel compatibility
2026-02-24 13:19:38 +08:00