feat: 支持多租户多模型对话及文档去重优化
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"gitea.com/red-future/common/beans"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/pgvector/pgvector-go"
|
||||
)
|
||||
|
||||
// CreateDocumentReq 创建文件请求
|
||||
@@ -45,7 +46,9 @@ type DeleteDocumentReq struct {
|
||||
type GetDocumentReq struct {
|
||||
g.Meta `path:"/get" method:"get" tags:"文件管理" summary:"获取文件详情" dc:"获取文件详情"`
|
||||
|
||||
Id int64 `json:"id" v:"required#ID不能为空"`
|
||||
Id int64 `json:"id" v:"required#ID不能为空"`
|
||||
DatasetId int64 `json:"datasetId"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
type GetDocumentRes struct {
|
||||
@@ -60,6 +63,7 @@ type ListDocumentReq struct {
|
||||
Page *beans.Page `json:"page"`
|
||||
DatasetId int64 `json:"datasetId"`
|
||||
Keyword string `json:"keyword" dc:"关键词搜索"`
|
||||
Title string `json:"title" dc:"文件标题"`
|
||||
Status document.Status `json:"status"`
|
||||
}
|
||||
|
||||
@@ -92,7 +96,9 @@ type DocumentVectorReq struct {
|
||||
}
|
||||
|
||||
type DocumentVectorRPC struct {
|
||||
Id int64 `json:"id" dc:"id"`
|
||||
DatasetId int64 `json:"datasetId" dc:"所属数据集ID"`
|
||||
ContentHash string `json:"contentHash" dc:"内容hash"`
|
||||
Id int64 `json:"id" dc:"id"`
|
||||
DatasetId int64 `json:"datasetId" dc:"所属数据集ID"`
|
||||
DocumentId int64 `json:"documentId" dc:"文件ID"`
|
||||
ContentHash string `json:"contentHash" dc:"内容hash"`
|
||||
Vector pgvector.Vector `json:"vector" dc:"向量"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user