chore: replace all cn comments to en version by volc api (#313)
This commit is contained in:
@@ -8,17 +8,17 @@ const TableNameVariableInstance = "variable_instance"
|
||||
|
||||
// VariableInstance KV Memory
|
||||
type VariableInstance struct {
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:主键ID" json:"id"` // 主键ID
|
||||
BizType int32 `gorm:"column:biz_type;not null;comment:1 for agent,2 for app" json:"biz_type"` // 1 for agent,2 for app
|
||||
BizID string `gorm:"column:biz_id;not null;comment:1 for agent_id,2 for app_id" json:"biz_id"` // 1 for agent_id,2 for app_id
|
||||
Version string `gorm:"column:version;not null;comment:agent or project 版本,为空代表草稿态" json:"version"` // agent or project 版本,为空代表草稿态
|
||||
Keyword string `gorm:"column:keyword;not null;comment:记忆的KEY" json:"keyword"` // 记忆的KEY
|
||||
Type int32 `gorm:"column:type;not null;comment:记忆类型 1 KV 2 list" json:"type"` // 记忆类型 1 KV 2 list
|
||||
Content string `gorm:"column:content;comment:记忆内容" json:"content"` // 记忆内容
|
||||
ConnectorUID string `gorm:"column:connector_uid;not null;comment:二方用户ID" json:"connector_uid"` // 二方用户ID
|
||||
ConnectorID int64 `gorm:"column:connector_id;not null;comment:二方id, e.g. coze = 10000010" json:"connector_id"` // 二方id, e.g. coze = 10000010
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:创建时间" json:"created_at"` // 创建时间
|
||||
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:更新时间" json:"updated_at"` // 更新时间
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:id" json:"id"` // id
|
||||
BizType int32 `gorm:"column:biz_type;not null;comment:1 for agent,2 for app" json:"biz_type"` // 1 for agent,2 for app
|
||||
BizID string `gorm:"column:biz_id;not null;comment:1 for agent_id,2 for app_id" json:"biz_id"` // 1 for agent_id,2 for app_id
|
||||
Version string `gorm:"column:version;not null;comment:agent or project version empty represents draft status" json:"version"` // agent or project version empty represents draft status
|
||||
Keyword string `gorm:"column:keyword;not null;comment:Keyword to Memory" json:"keyword"` // Keyword to Memory
|
||||
Type int32 `gorm:"column:type;not null;comment:Memory type 1 KV 2 list" json:"type"` // Memory type 1 KV 2 list
|
||||
Content string `gorm:"column:content;comment:content" json:"content"` // content
|
||||
ConnectorUID string `gorm:"column:connector_uid;not null;comment:connector_uid" json:"connector_uid"` // connector_uid
|
||||
ConnectorID int64 `gorm:"column:connector_id;not null;comment:connector_id, e.g. coze = 10000010" json:"connector_id"` // connector_id, e.g. coze = 10000010
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:Create Time in Milliseconds" json:"created_at"` // Create Time in Milliseconds
|
||||
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:Update Time in Milliseconds" json:"updated_at"` // Update Time in Milliseconds
|
||||
}
|
||||
|
||||
// TableName VariableInstance's table name
|
||||
|
||||
@@ -10,14 +10,14 @@ const TableNameVariablesMeta = "variables_meta"
|
||||
|
||||
// VariablesMeta KV Memory meta
|
||||
type VariablesMeta struct {
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:主键ID" json:"id"` // 主键ID
|
||||
CreatorID int64 `gorm:"column:creator_id;not null;comment:创建者ID" json:"creator_id"` // 创建者ID
|
||||
BizType int32 `gorm:"column:biz_type;not null;comment:1 for agent,2 for app" json:"biz_type"` // 1 for agent,2 for app
|
||||
BizID string `gorm:"column:biz_id;not null;comment:1 for agent_id,2 for app_id" json:"biz_id"` // 1 for agent_id,2 for app_id
|
||||
VariableList []*entity.VariableMeta `gorm:"column:variable_list;comment:变量配置的json数据;serializer:json" json:"variable_list"` // 变量配置的json数据
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:create time" json:"created_at"` // create time
|
||||
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:update time" json:"updated_at"` // update time
|
||||
Version string `gorm:"column:version;not null;comment:project版本,为空代表草稿态" json:"version"` // project版本,为空代表草稿态
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:id" json:"id"` // id
|
||||
CreatorID int64 `gorm:"column:creator_id;not null;comment:creator id" json:"creator_id"` // creator id
|
||||
BizType int32 `gorm:"column:biz_type;not null;comment:1 for agent,2 for app" json:"biz_type"` // 1 for agent,2 for app
|
||||
BizID string `gorm:"column:biz_id;not null;comment:1 for agent_id,2 for app_id" json:"biz_id"` // 1 for agent_id,2 for app_id
|
||||
VariableList []*entity.VariableMeta `gorm:"column:variable_list;comment:JSON data for variable configuration;serializer:json" json:"variable_list"` // JSON data for variable configuration
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:Create Time in Milliseconds" json:"created_at"` // Create Time in Milliseconds
|
||||
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:Update Time in Milliseconds" json:"updated_at"` // Update Time in Milliseconds
|
||||
Version string `gorm:"column:version;not null;comment:Project version, empty represents draft status" json:"version"` // Project version, empty represents draft status
|
||||
}
|
||||
|
||||
// TableName VariablesMeta's table name
|
||||
|
||||
@@ -49,17 +49,17 @@ type variableInstance struct {
|
||||
variableInstanceDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Int64 // 主键ID
|
||||
ID field.Int64 // id
|
||||
BizType field.Int32 // 1 for agent,2 for app
|
||||
BizID field.String // 1 for agent_id,2 for app_id
|
||||
Version field.String // agent or project 版本,为空代表草稿态
|
||||
Keyword field.String // 记忆的KEY
|
||||
Type field.Int32 // 记忆类型 1 KV 2 list
|
||||
Content field.String // 记忆内容
|
||||
ConnectorUID field.String // 二方用户ID
|
||||
ConnectorID field.Int64 // 二方id, e.g. coze = 10000010
|
||||
CreatedAt field.Int64 // 创建时间
|
||||
UpdatedAt field.Int64 // 更新时间
|
||||
Version field.String // agent or project version empty represents draft status
|
||||
Keyword field.String // Keyword to Memory
|
||||
Type field.Int32 // Memory type 1 KV 2 list
|
||||
Content field.String // content
|
||||
ConnectorUID field.String // connector_uid
|
||||
ConnectorID field.Int64 // connector_id, e.g. coze = 10000010
|
||||
CreatedAt field.Int64 // Create Time in Milliseconds
|
||||
UpdatedAt field.Int64 // Update Time in Milliseconds
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
|
||||
@@ -46,14 +46,14 @@ type variablesMeta struct {
|
||||
variablesMetaDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Int64 // 主键ID
|
||||
CreatorID field.Int64 // 创建者ID
|
||||
ID field.Int64 // id
|
||||
CreatorID field.Int64 // creator id
|
||||
BizType field.Int32 // 1 for agent,2 for app
|
||||
BizID field.String // 1 for agent_id,2 for app_id
|
||||
VariableList field.Field // 变量配置的json数据
|
||||
CreatedAt field.Int64 // create time
|
||||
UpdatedAt field.Int64 // update time
|
||||
Version field.String // project版本,为空代表草稿态
|
||||
VariableList field.Field // JSON data for variable configuration
|
||||
CreatedAt field.Int64 // Create Time in Milliseconds
|
||||
UpdatedAt field.Int64 // Update Time in Milliseconds
|
||||
Version field.String // Project version, empty represents draft status
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ func (m *VariablesDAO) UpdateProjectVariable(ctx context.Context, do *entity.Var
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetVariableMeta 获取变量元数据 , 不存在返回 nil
|
||||
// GetVariableMeta Gets variable metadata, returns nil if it does not exist
|
||||
func (m *VariablesDAO) GetVariableMeta(ctx context.Context, bizID string, bizType project_memory.VariableConnector, version string) (*entity.VariablesMeta, error) {
|
||||
table := query.VariablesMeta
|
||||
condWhere := []gen.Condition{
|
||||
@@ -103,7 +103,7 @@ func (m *VariablesDAO) GetVariableMeta(ctx context.Context, bizID string, bizTyp
|
||||
return do, nil
|
||||
}
|
||||
|
||||
// GetVariableMetaByID 获取变量元数据, 不存在返回 nil
|
||||
// GetVariableMetaByID Gets variable metadata, returns nil if there is no such thing
|
||||
func (m *VariablesDAO) GetVariableMetaByID(ctx context.Context, id int64) (*entity.VariablesMeta, error) {
|
||||
table := query.VariablesMeta
|
||||
condWhere := []gen.Condition{
|
||||
|
||||
Reference in New Issue
Block a user