|
@@ -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())
|