Files
rag-local/kb/model/dto/dataset_dto.go
T
2026-08-07 13:18:53 +08:00

42 lines
1.1 KiB
Go

package dto
import (
"rag-local/kb/model/entity"
"github.com/gogf/gf/v2/frame/g"
)
type ListDatasetReq struct {
g.Meta `path:"/list" method:"get" tags:"数据集" summary:"数据集列表"`
}
type ListDatasetRes struct {
List []*entity.Dataset `json:"list"`
}
type SaveDatasetReq struct {
g.Meta `path:"/save" method:"post" tags:"数据集" summary:"保存数据集"`
Id int64 `json:"id"`
Name string `v:"required" json:"name"`
Description string `json:"description"`
EmbeddingCfgId int64 `json:"embedding_cfg_id"`
ChunkSize int `json:"chunk_size"`
ChunkOverlap int `json:"chunk_overlap"`
ReactRounds int `json:"react_rounds"`
VecTopK int `json:"vec_top_k"`
FtsTopK int `json:"fts_top_k"`
RerankTopK int `json:"rerank_top_k"`
RecallTopK int `json:"recall_top_k"`
}
type SaveDatasetRes struct {
Id int64 `json:"id"`
}
type DeleteDatasetReq struct {
g.Meta `path:"/delete" method:"post" tags:"数据集" summary:"删除数据集"`
Id int64 `v:"required" json:"id"`
}
type DeleteDatasetRes struct{}