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 4c4dfdc03..c9123e5ed 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 @@ -365,7 +365,7 @@ public class ConversationServiceImpl implements ConversationService { && Objects.equals(expectedGroupId, actualGroupId); } - public static final String PROMPT="Use the following context as your learned knowledge, inside XML tags.\\n\\n\\n{{#context#}}\\n\\n\\nWhen answer to user:\\n- If you don't know, just say that you don't know.\\n- If you don't know when you are not sure, ask for clarification.\\nAvoid mentioning that you obtained the information from the context.\\nAnd answer according to the language of the user's question.\\n\\n"; + public static final String PROMPT="Use the following context as your learned knowledge, inside XML tags.When answer to user:\\n- If you don't know, just say that you don't know.\\n- If you don't know when you are not sure, ask for clarification.\\nAvoid mentioning that you obtained the information from the context.\\nAnd answer according to the language of the user's question.\\n\\n"; /** * 公共模型聊天流式处理方法 * @@ -649,7 +649,8 @@ public class ConversationServiceImpl implements ConversationService { } if (StringUtils.isNotBlank(pageContent)) { - knowledgeBase.append("\n[知识库内容] [内容如下]").append(pageContent); +// knowledgeBase.append("\n[知识库内容] [内容如下]").append(pageContent); + knowledgeBase.append(pageContent); log.info("{} 添加知识内容,长度: {}", "[KnowledgeBase]", pageContent.length()); ParagraphHitRateVO paragraphHitRateVO = new ParagraphHitRateVO();