浏览代码

Merge remote-tracking branch 'origin/rag/3.1' into debug

Roc 1 周之前
父节点
当前提交
f2fd52a2db
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      controllers/llm/report.go

+ 2 - 1
controllers/llm/report.go

@@ -10,6 +10,7 @@ import (
 	"fmt"
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"html"
+	"strings"
 )
 
 // RagEtaReportController
@@ -146,7 +147,7 @@ func (c *RagEtaReportController) ArticleDetail() {
 			content = reportInfo.Content
 			// 如果是rai报告,则使用纯文本的报告内容
 			if reportInfo.RaiReportId > 0 {
-				content = item.TextContent
+				content = strings.ReplaceAll(item.TextContent, `\n`, `<br />`)
 			}
 		} else {
 			// 章节报告