hongze преди 1 година
родител
ревизия
57c0130a7f
променени са 2 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 2 2
      controllers/ai/ai_file.go
  2. 0 1
      models/aimod/ai_file.go

+ 2 - 2
controllers/ai/ai_file.go

@@ -21,7 +21,7 @@ type AiFileController struct {
 
 // @Title 文件上传
 // @Description 文件上传接口
-// @Param   file   query   file  true       "文件"
+// @Param   File   query   file  true       "文件"
 // @Success 200 {object} models.ResourceResp
 // @router /file/upload [post]
 func (this *AiFileController) FileUpload() {
@@ -30,7 +30,7 @@ func (this *AiFileController) FileUpload() {
 		this.Data["json"] = br
 		this.ServeJSON()
 	}()
-	f, h, err := this.GetFile("file")
+	f, h, err := this.GetFile("File")
 	if err != nil {
 		br.Msg = "获取资源信息失败"
 		br.ErrMsg = "获取资源信息失败,Err:" + err.Error()

+ 0 - 1
models/aimod/ai_file.go

@@ -3,6 +3,5 @@ package aimod
 type FileRetrieveReq struct {
 	AiChatTopicId int      `description:"主题id"`
 	Ask           string   `description:"提问问题,如果是上传文件,则填入文件名称"`
-	FileName      string   `description:"文件名称"`
 	OpenaiFileId  []string `description:"openai返回的文件id"`
 }