feat(复习):回忆对比优先走 AI 语义对比,失败时降级为内置算法

- CompareResult.java:新增 evaluation 字段(AI 对比时写入评价文本)
- AiServiceClient.java:新增 compareRecall(),调用 lpt-ai /ai/compare-recall
- StandardMindMapServiceImpl.java:recallCompare() 中注入 AiServiceClient,
  优先 try AI 语义对比,含层级上下文和同义表达识别;
  AI 不可用或失败时自动 fallback 到内置标题匹配算法
- StandardMindMapServiceImplTest.java:适配新增的 AiServiceClient 依赖
This commit is contained in:
2026-07-04 15:47:24 +08:00
parent cd5ee0b404
commit 7ac7868511
4 changed files with 66 additions and 3 deletions
@@ -45,6 +45,8 @@ class StandardMindMapServiceImplTest {
private List<MindMapAiClient> aiClients;
@Mock
private MindMapAiClient mockAiClient;
@Mock
private AiServiceClient aiServiceClient;
private final ObjectMapper objectMapper = new ObjectMapper();
@@ -189,7 +191,7 @@ class StandardMindMapServiceImplTest {
standardMindMapMapper, recallRecordMapper,
tasksMapper, studyReportsMapper, studyReportFragmentsMapper,
taskApplicationMapper, studySessionsMapper,
List.of(mockAiClient), objectMapper);
List.of(mockAiClient), objectMapper, aiServiceClient);
return s;
}
}