From 577834568b8dc87425999c5e04833f59a39e8ca1 Mon Sep 17 00:00:00 2001 From: v-zhangjc9 Date: Wed, 4 Jun 2025 18:52:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(ai):=20=E4=BC=98=E5=8C=96UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ai/chat/controller/ChatController.java | 2 +- service-web/client/src/pages/ai/Conversation.tsx | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/controller/ChatController.java b/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/controller/ChatController.java index 369a644..3b0690a 100644 --- a/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/controller/ChatController.java +++ b/service-ai/service-ai-chat/src/main/java/com/lanyuanxiaoyao/service/ai/chat/controller/ChatController.java @@ -62,7 +62,7 @@ public class ChatController { """, LocalDateTime.now().format(formatter))); if (ObjectUtil.isNotNull(knowledgeId)) { var vo = messages.select(message -> StrUtil.equals(message.getRole(), "user")).getLastOptional().orElseThrow(); - var documents = knowledgeService.query(knowledgeId, vo.getContent(), 0.5); + var documents = knowledgeService.query(knowledgeId, vo.getContent(), 10, 0.5); if (ObjectUtil.isNotEmpty(documents)) { builder.append(StrUtil.format(""" 以下是与用户问题有关的外部知识,优先利用该知识回答用户的提问: diff --git a/service-web/client/src/pages/ai/Conversation.tsx b/service-web/client/src/pages/ai/Conversation.tsx index 1e271e0..f31e32e 100644 --- a/service-web/client/src/pages/ai/Conversation.tsx +++ b/service-web/client/src/pages/ai/Conversation.tsx @@ -27,14 +27,6 @@ const ConversationDiv = styled.div` margin-bottom: 30px; padding-left: 30px; padding-right: 30px; - - think { - color: gray; - display: block; - border-left: 3px solid lightgray; - padding-left: 10px; - margin-bottom: 10px; - } } .conversation-sender { @@ -134,6 +126,7 @@ function Conversation() { ? :