Merge remote-tracking branch 'origin/dev' into dev

jinan_dev
xueqingkun 5 months ago
commit 5adb4403fa

@ -25,5 +25,4 @@ public class DifyConstants {
public static final String INTENT_TYPE_TEXT_CASE_EVIDENCE_GUIDE = "案件证据指引";
}

@ -117,8 +117,12 @@ public class ChatServiceImpl implements ChatService {
switch (type) {
case QA_TYPE_DIFY:
if (modelIndices.stream().map(ModelIndex::getName).anyMatch(query::equals)) {
type = QA_TYPE_NX_LLM;
intentType = INTENT_TYPE_INDEX_RESULT;
handleIndexResultQA(modelIndices, query, caseId, answerMap);
} else if (INTENT_TYPE_TEXT_CASE_RESULT.equals(query) || INTENT_TYPE_CASE_RESULT.equals(intentType)) {
type = QA_TYPE_NX_LLM;
intentType = INTENT_TYPE_CASE_RESULT;
ModelCase modelCase = modelCaseService.getById(caseId);
if (modelCase.getTotalScore() == null) {
log.info("案件【{}】尚未执行模型分析,现在开始执行", modelCase.getCaseName());
@ -127,9 +131,13 @@ public class ChatServiceImpl implements ChatService {
modelService.analyseCaseNew(analyseCaseDTO);
}
answerMap = JSON.parseObject(JSON.toJSONString(modelService.caseScoreDetail(caseId)), Map.class);
} else if (INTENT_TYPE_CASE_OVERVIEW.equals(query) || INTENT_TYPE_CASE_OVERVIEW.equals(intentType)) {
} else if (INTENT_TYPE_TEXT_CASE_OVERVIEW.equals(query) || INTENT_TYPE_CASE_OVERVIEW.equals(intentType)) {
type = QA_TYPE_NX_LLM;
intentType = INTENT_TYPE_CASE_OVERVIEW;
answerMap.put("answerText", modelCaseService.getById(caseId).getCaseDetail());
} else if (INTENT_TYPE_CASE_EVIDENCE_GUIDE.equals(query) || INTENT_TYPE_CASE_EVIDENCE_GUIDE.equals(intentType)) {
} else if (INTENT_TYPE_TEXT_CASE_EVIDENCE_GUIDE.equals(query) || INTENT_TYPE_CASE_EVIDENCE_GUIDE.equals(intentType)) {
type = QA_TYPE_NX_LLM;
intentType = INTENT_TYPE_CASE_EVIDENCE_GUIDE;
answerMap.put("guideDesc", modelService.caseScoreDetail(caseId).getGuideDesc());
} else {
ModelCase modelCase = modelCaseService.getById(caseId);

Loading…
Cancel
Save