fix(llm): 修复知识库问答中页面内容换行符问题
- 在提取页面内容后,添加了替换换行符的代码 - 将 pageContent 中的 \n 和 \r 替换为空字符串,避免在返回结果中显示换行符
This commit is contained in:
parent
511b99fe62
commit
35e19396e1
@ -603,6 +603,7 @@ public class ConversationServiceImpl implements ConversationService {
|
||||
// 提取页面内容
|
||||
JSONObject content = firstResult.getJSONObject(0);
|
||||
String pageContent = content.getString("page_content");
|
||||
pageContent = pageContent.replace("\n", "").replace("\r", "");
|
||||
log.info("{} 内容: {}", "[KnowledgeBase]", JSON.toJSONString(pageContent));
|
||||
|
||||
JSONObject metadata = content.getJSONObject("metadata");
|
||||
|
Loading…
x
Reference in New Issue
Block a user