Files
rag-local/kb/model/dto/document_dto.go
T
2026-08-05 10:28:44 +08:00

47 lines
1.2 KiB
Go

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 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{}