diff --git a/src/main/java/com/supervision/police/service/impl/ChatServiceImpl.java b/src/main/java/com/supervision/police/service/impl/ChatServiceImpl.java index 8f22917..6fb9511 100644 --- a/src/main/java/com/supervision/police/service/impl/ChatServiceImpl.java +++ b/src/main/java/com/supervision/police/service/impl/ChatServiceImpl.java @@ -168,7 +168,6 @@ public class ChatServiceImpl implements ChatService { if (json.getBoolean("isFunctionCalling")) { answerMap = executeIntent(json.getString("intentType"), caseId, json.getString("query"), answerMap, modelIndices); } else { - chatResVO.setAnswer(json.getString("answerText")); chatResVO.setSegmentList(JSONArray.parseArray(json.getString("quote"), KnowledgeBaseSegmentVO.class)); } JSONArray adviceList = json.getJSONArray("adviceList"); @@ -190,6 +189,7 @@ public class ChatServiceImpl implements ChatService { adviceMapList.add(Map.of("indexType", "", "indexName", "以上都不是")); answerMap.put("adviceList", adviceMapList); } + chatResVO.setAnswer(json.getString("answerText")); chatResVO.setDialogueCount(json.getInteger("dialogueCount") == null ? 0 : json.getInteger("dialogueCount")); } else { log.error("返回结果格式异常,query:【{}】", query);