feat: rag初始版
This commit is contained in:
69
model/dto/dataset.go
Normal file
69
model/dto/dataset.go
Normal file
@@ -0,0 +1,69 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// CreateDatasetReq 创建数据集请求
|
||||
type CreateDatasetReq struct {
|
||||
g.Meta `path:"/createDataset" method:"post" tags:"知识库(数据集)管理" summary:"创建知识库(数据集)" dc:"创建知识库(数据集)"`
|
||||
|
||||
Name string `json:"name" v:"required#名称不能为空"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
// CreateDatasetRes 创建数据集响应
|
||||
type CreateDatasetRes struct {
|
||||
Id int64 `json:"id,string"`
|
||||
}
|
||||
|
||||
// UpdateDatasetReq 更新数据集请求
|
||||
type UpdateDatasetReq struct {
|
||||
g.Meta `path:"/updateDataset" method:"put" tags:"知识库(数据集)管理" summary:"更新知识库(数据集)" dc:"更新知识库(数据集)"`
|
||||
|
||||
Id int64 `json:"id" v:"required#ID不能为空"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
DocumentCount int64 `json:"documentCount"`
|
||||
DocumentSize int64 `json:"documentSize"`
|
||||
}
|
||||
|
||||
// DeleteDatasetReq 删除数据集请求
|
||||
type DeleteDatasetReq struct {
|
||||
g.Meta `path:"/deleteDataset" method:"delete" tags:"知识库(数据集)管理" summary:"删除知识库(数据集)" dc:"删除知识库(数据集)"`
|
||||
|
||||
Id int64 `json:"id" v:"required#ID不能为空"`
|
||||
}
|
||||
|
||||
// GetDatasetReq 获取数据集请求
|
||||
type GetDatasetReq struct {
|
||||
g.Meta `path:"/getDataset" method:"get" tags:"知识库(数据集)管理" summary:"获取知识库(数据集)详情" dc:"获取知识库(数据集)详情"`
|
||||
|
||||
Id int64 `json:"id" v:"required#ID不能为空"`
|
||||
}
|
||||
|
||||
// ListDatasetReq 数据集列表请求
|
||||
type ListDatasetReq struct {
|
||||
g.Meta `path:"/listDataset" method:"get" tags:"知识库(数据集)管理" summary:"获取知识库(数据集)列表" dc:"分页查询知识库(数据集)列表,支持多条件筛选"`
|
||||
|
||||
Page *beans.Page `json:"page"`
|
||||
Keyword string `json:"keyword" dc:"关键词搜索"`
|
||||
}
|
||||
|
||||
// ListDatasetRes 数据集列表响应
|
||||
type ListDatasetRes struct {
|
||||
List []*DatasetVO `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
type DatasetVO struct {
|
||||
Id int64 `json:"id,string" dc:"id"`
|
||||
Name string `json:"name" dc:"数据集名称"`
|
||||
Description string `json:"description" dc:"数据集描述"`
|
||||
DocumentCount int64 `json:"documentCount" dc:"文件数量"`
|
||||
DocumentSize int64 `json:"documentSize" dc:"文件大小(字节)"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
Reference in New Issue
Block a user