浏览代码

Merge branch 'feature/deepseek_rag_2.0' into debug

kobe6258 1 周之前
父节点
当前提交
5d32ddcff1

+ 5 - 0
controllers/llm/promote_controller.go

@@ -51,6 +51,11 @@ func (pCtrl *PromoteController) GenerateContent() {
 		br.ErrMsg = "公众号文章编号非法"
 		return
 	}
+	if gcReq.LLMModel == "" {
+		br.Msg = "LLM模型不能为空"
+		br.ErrMsg = "LLM模型不能为空"
+		return
+	}
 	userSendTime := time.Now()
 	userContent := llm_http.Content{
 		Content:  gcReq.Promote,

+ 2 - 9
services/llm/facade/llm_service.go

@@ -161,20 +161,13 @@ func AIGCBaseOnPromote(aigc AIGC) (resp bus_response.AIGCEtaResponse, err error)
 				utils.FileLog.Error("打开文件失败,err:", err)
 				return
 			}
-			uploadResp, httpErr := llmService.UploadFileToTemplate([]*os.File{file}, param)
+			_, httpErr = llmService.UploadFileToTemplate([]*os.File{file}, param)
 			if httpErr != nil {
 				utils.FileLog.Error("上传文件失败,err:", err.Error())
 				err = fmt.Errorf("上传文件失败,err:%v", httpErr)
 				return
 			}
-			data := uploadResp.(eta_llm_http.UploadDocsResponse)
-			//保存映射关系到数据库
-			if data.Id == "" {
-				utils.FileLog.Error("上传文件失败,向量库Id获取失败")
-				err = fmt.Errorf("上传文件失败,向量库Id获取失败")
-				return
-			}
-			fmt.Println(data.Id)
+
 			response, httpErr = llmService.FileChat(aigc.Promote, kbId, aigc.LLMModel, nil)
 			if httpErr != nil {
 				utils.FileLog.Error("内容生成失败,err:%v", httpErr.Error())

文件差异内容过多而无法显示
+ 0 - 0
static/imgs/ai/article/【东海首席】黑色金属专题报告新一轮钢铁供给侧改革能否全面开启.md


部分文件因为文件数量过多而无法显示