Browse Source

fix:文件与内容做汇总处理

Roc 1 year ago
parent
commit
bc77c4b3a8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      controllers/ai/ai_file.go

+ 1 - 1
controllers/ai/ai_file.go

@@ -317,12 +317,12 @@ func (this *AiFileController) FileRetrieve() {
 			if v.OpenaiFileId != "" {
 				tmpFileIdList = append(tmpFileIdList, v.OpenaiFileId)
 			} else {
-				tmpFileIdList = []string{}
 				historyFr := new(aimod.HistoryChat)
 				historyFr.Ask = v.Ask
 				historyFr.Answer = v.Answer
 				historyFr.OpenaiFileId = tmpFileIdList
 				frList = append(frList, *historyFr)
+				tmpFileIdList = []string{}
 			}
 		}
 		// 当前的消息