|
|
|
@ -170,7 +170,6 @@ public class ChatServiceImpl implements ChatService {
|
|
|
|
|
} else {
|
|
|
|
|
chatResVO.setAnswer(json.getString("answerText"));
|
|
|
|
|
chatResVO.setSegmentList(JSONArray.parseArray(json.getString("quote"), KnowledgeBaseSegmentVO.class));
|
|
|
|
|
chatResVO.setDialogueCount(json.getInteger("dialogueCount") == null ? 0 : json.getInteger("dialogueCount"));
|
|
|
|
|
}
|
|
|
|
|
JSONArray adviceList = json.getJSONArray("adviceList");
|
|
|
|
|
if (adviceList != null && !adviceList.isEmpty()) {
|
|
|
|
@ -191,6 +190,7 @@ public class ChatServiceImpl implements ChatService {
|
|
|
|
|
adviceMapList.add(Map.of("indexType", "", "indexName", "以上都不是"));
|
|
|
|
|
answerMap.put("adviceList", adviceMapList);
|
|
|
|
|
}
|
|
|
|
|
chatResVO.setDialogueCount(json.getInteger("dialogueCount") == null ? 0 : json.getInteger("dialogueCount"));
|
|
|
|
|
} else {
|
|
|
|
|
log.error("返回结果格式异常,query:【{}】", query);
|
|
|
|
|
}
|
|
|
|
|