feat: rag初始版
This commit is contained in:
46
model/entity/dataset_index.go
Normal file
46
model/entity/dataset_index.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package entity
|
||||
|
||||
import "gitea.com/red-future/common/beans"
|
||||
|
||||
type datasetIndexCol struct {
|
||||
beans.SQLBaseCol
|
||||
Status string
|
||||
VectorStatus string
|
||||
DatasetId string
|
||||
Name string
|
||||
Collection string
|
||||
Dimension string
|
||||
FieldType string
|
||||
MetricType string
|
||||
VectorCount string
|
||||
Description string
|
||||
}
|
||||
|
||||
var DatasetIndexCol = datasetIndexCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
Status: "status",
|
||||
VectorStatus: "vector_status",
|
||||
DatasetId: "dataset_id",
|
||||
Name: "name",
|
||||
Collection: "collection",
|
||||
Dimension: "dimension",
|
||||
FieldType: "field_type",
|
||||
MetricType: "metric_type",
|
||||
VectorCount: "vector_count",
|
||||
Description: "description",
|
||||
}
|
||||
|
||||
// DatasetIndex 数据集索引实体
|
||||
type DatasetIndex struct {
|
||||
beans.SQLBaseDO `orm:",inline"`
|
||||
|
||||
DatasetId int64 `orm:"dataset_id" json:"datasetId" dc:"数据集ID"`
|
||||
Name string `orm:"name" json:"name" dc:"索引名称"`
|
||||
Collection string `orm:"collection" json:"collection" dc:"向量集合名称"`
|
||||
Dimension int `orm:"dimension" json:"dimension" dc:"向量维度"`
|
||||
FieldType string `orm:"field_type" json:"fieldType" dc:"字段类型: float, binary"`
|
||||
MetricType string `orm:"metric_type" json:"metricType" dc:"度量类型: L2, IP, COSINE"`
|
||||
Status *int8 `orm:"status" json:"status" dc:"状态: creating, ready, error"`
|
||||
VectorCount int64 `orm:"vector_count" json:"vectorCount" dc:"向量数量"`
|
||||
Description string `orm:"description" json:"description" dc:"描述"`
|
||||
}
|
||||
Reference in New Issue
Block a user