From 69e8eafdafcd00e0921f5ebd7ef2319021d93e50 Mon Sep 17 00:00:00 2001 From: yaxin Date: Wed, 11 Dec 2024 16:16:48 +0800 Subject: [PATCH] =?UTF-8?q?answerText=E6=97=A0=E8=AE=BA=E5=A6=82=E4=BD=95?= =?UTF-8?q?=E9=83=BD=E8=A6=81=E5=B0=9D=E8=AF=95=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/supervision/police/service/impl/ChatServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);