From 7a8eabe74537ff88aef9bd1b0244b6d9c162f39d Mon Sep 17 00:00:00 2001 From: sunxiqing <2240398334@qq.com> Date: Wed, 5 Mar 2025 10:51:09 +0800 Subject: [PATCH] =?UTF-8?q?refactor(module-llm):=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=9F=A5=E8=AF=86=E5=BA=93=E6=9F=A5=E8=AF=A2=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -将 jsonArray1 的类型从 JSONArray改为 com.alibaba.fastjson.JSONArray,避免类型转换错误 - 优化代码格式,提高可读性 --- .../llm/service/conversation/ConversationServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/conversation/ConversationServiceImpl.java b/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/conversation/ConversationServiceImpl.java index 4cf65d4ab..b4e7e43db 100644 --- a/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/conversation/ConversationServiceImpl.java +++ b/yudao-module-llm/yudao-module-llm-biz/src/main/java/cn/iocoder/yudao/module/llm/service/conversation/ConversationServiceImpl.java @@ -377,7 +377,7 @@ public class ConversationServiceImpl implements ConversationService { String result = HttpUtils.post(llmBackendProperties.getEmbedQuery(), null, JSON.toJSONString(knowledgeRagEmbedQueryVO)); com.alibaba.fastjson.JSONArray jsonArray = JSON.parseArray(result); if (jsonArray != null && !jsonArray.isEmpty()) { - JSONArray jsonArray1 = (JSONArray) jsonArray.get(0); + com.alibaba.fastjson.JSONArray jsonArray1 = (com.alibaba.fastjson.JSONArray) jsonArray.get(0); JSONObject jsonObject = (JSONObject) jsonArray1.get(0); knowledgeBase.append(jsonObject.get("page_content")); }