package dto import ( "rag-local/kb/model/entity" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/net/ghttp" ) type UploadDocumentReq struct { g.Meta `path:"/upload" method:"post" tags:"文档" summary:"上传文档"` DatasetId int64 `json:"dataset_id"` File *ghttp.UploadFile `json:"file" dc:"文档文件"` } type UploadDocumentRes struct { Id int64 `json:"id"` } type ListDocumentReq struct { g.Meta `path:"/list" method:"get" tags:"文档" summary:"文档列表"` DatasetId int64 `v:"required" json:"dataset_id"` Page int `json:"page"` PageSize int `json:"page_size"` } type ListDocumentRes struct { List []*entity.Document `json:"list"` Total int `json:"total"` Page int `json:"page"` PageSize int `json:"page_size"` } type GetDocumentDetailReq struct { g.Meta `path:"/detail" method:"get" tags:"文档" summary:"文档详情(含原始全文)"` Id int64 `v:"required" json:"id"` } type GetDocumentDetailRes struct { Document *entity.Document `json:"document"` } type DeleteDocumentReq struct { g.Meta `path:"/delete" method:"post" tags:"文档" summary:"删除文档"` Id int64 `v:"required" json:"id"` } type DeleteDocumentRes struct{} type ReembedDocumentReq struct { g.Meta `path:"/reembed" method:"post" tags:"文档" summary:"重新向量化"` Id int64 `v:"required" json:"id"` } type ReembedDocumentRes struct{}