model

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DocSegmentImportInit      = 0 //任务待处理
	DocSegmentImportImporting = 1 //文档分段导入中
	DocSegmentImportSuccess   = 2 //文档分段导入成功
	DocSegmentImportFail      = 3 //文档分段导入失败
)
View Source
const (
	DocWaitingForUpload = -2 //文档待上传
	DocInit             = 0  //文档待处理
	DocSuccess          = 1  //文档处理完成
	DocProcessing       = 3  //文档处理中
	DocFail             = 5  //文档待处理

	GraphInit          GraphStatus = 0   //图谱未处理
	GraphSuccess       GraphStatus = 100 //图谱生成成功
	GraphChunkFail     GraphStatus = 101 //图谱生成chunk文本失败
	GraphExtractFail   GraphStatus = 102 //图谱生成提取失败
	GraphStoreFail     GraphStatus = 103 //图谱持久化存储失败
	GraphProcessing    GraphStatus = 110 //图谱开始解析
	GraphInterruptFail GraphStatus = 119
)
View Source
const (
	MetaTypeString = "string"
	MetaTypeNumber = "number"
	MetaTypeTime   = "time"
)
View Source
const (
	KnowledgeImportAnalyze = 1   //知识库任务解析中
	KnowledgeImportSubmit  = 2   //知识库任务已提交
	KnowledgeImportFinish  = 3   //知识库任务导入完成
	KnowledgeImportError   = 4   //知识库任务导入失败
	FileImportType         = 0   //文件上传
	UrlImportType          = 1   //url上传
	UrlFileImportType      = 2   //2.批量url上传
	ParentSegmentMethod    = "1" //父子分段
	CommonSegmentMethod    = "0" //通用分段
)
View Source
const (
	PermissionTypeNone   = -1 //未操作权限
	PermissionTypeView   = 0  //查看权限
	PermissionTypeEdit   = 10 //编辑权限
	PermissionTypeGrant  = 20 //授权权限 数值不连续的原因防止后续有中间权限,目前逻辑 授权权限>编辑权限>查看权限
	PermissionTypeSystem = 30 //系统管理授权权限 数值不连续的原因防止后续有中间权限,目前逻辑 系统管理授权权限>授权权限>编辑权限>查看权限
)
View Source
const (
	RecordOptionAdd    = 0 //添加权限
	RecordOptionDelete = 1 //删除权限
	RecordOptionEdit   = 2 //修改权限
)

Variables

This section is empty.

Functions

func BuildGraphShowStatus added in v0.2.7

func BuildGraphShowStatus(status GraphStatus) (int, string)

BuildGraphShowStatus 报告展示状态 0:待处理,1.解析中,2.解析成功,3.解析失败

func ErrorReportStatus added in v0.2.7

func ErrorReportStatus(status ReportStatus) bool

func InGraphStatus added in v0.2.7

func InGraphStatus(status int) bool

func InReportStatus added in v0.2.7

func InReportStatus(status int) bool

func SuccessGraphStatus added in v0.2.7

func SuccessGraphStatus(status int) bool

Types

type AddKeywords added in v0.1.4

type AddKeywords struct {
	Id               uint32   `json:"id"`
	UserId           string   `json:"user_id"`
	Action           string   `json:"action"`
	Name             string   `json:"name"`
	Alias            []string `json:"alias"`
	KnowledgeBaseIds []string `json:"knowledge_base_list"`
}

type ChildChunkConfig added in v0.2.4

type ChildChunkConfig struct {
	Separators []string `json:"separators"` // 分隔符
	ChunkSize  int32    `json:"chunk_size"` // 子分段大小
}

type DocAnalyzer

type DocAnalyzer struct {
	AnalyzerList []string `json:"analyzerList"` //文档解析方式,ocr等
}

type DocImportInfo

type DocImportInfo struct {
	DocInfoList []*DocInfo `json:"docInfoList"`
}

type DocImportMetaData added in v0.1.7

type DocImportMetaData struct {
	DocMetaDataList []*KnowledgeDocMeta `json:"docMetaDataList"`
}

type DocInfo

type DocInfo struct {
	DocId   string `json:"docId"`   //文档id
	DocName string `json:"docName"` //文档名称
	DocUrl  string `json:"docUrl"`  //文档url
	DocType string `json:"docType"` // 文档类型
	DocSize int64  `json:"docSie"`  // 文档大小
}

type DocMetaData added in v0.1.7

type DocMetaData struct {
	MetaId    string      `json:"metaId"`    // 元数据id
	Key       string      `json:"key"`       // key
	Value     interface{} `json:"value"`     // 常量
	ValueType string      `json:"valueType"` // 常量类型
	Rule      string      `json:"rule"`      // 正则表达式
}

type DocPreProcess added in v0.1.7

type DocPreProcess struct {
	PreProcessList []string `json:"preProcessList"` //文档预处理方式: replace_symbols, delete_links
}

type DocSegmentImportParams added in v0.2.1

type DocSegmentImportParams struct {
	KnowledgeName      string   `json:"knowledgeName"`      // 知识库的名称
	KnowledgeRagName   string   `json:"knowledgeRagName"`   // 知识库的rag名称
	KnowledgeId        string   `json:"knowledgeId"`        // 知识库的唯一ID
	KnowledgeCreatorId string   `json:"knowledgeCreatorId"` // 知识库的创建者ID
	FileName           string   `json:"fileName"`           // 与chunk关联的文件名
	MaxSentenceSize    int      `json:"maxSentenceSize"`    // 最大分段长度限制
	FileUrl            string   `json:"fileUrl"`            //文件url
	SegmentMethod      string   `json:"segmentMethod"`      ////分段方法 0:通用分段;1:父子分段,字符串为空则认为是通用分段
	SubSplitter        []string `json:"subSplitter"`        // 分隔符(只有父子分段必填)
	SubMaxSplitter     int      `json:"subMaxSplitter"`     // 可分隔最大值(只有父子分段必填)
}

type DocSegmentImportTask added in v0.2.1

type DocSegmentImportTask struct {
	Id           uint32 `gorm:"column:id;primary_key;type:bigint(20) auto_increment;not null;comment:'id';" json:"id"`
	ImportId     string `gorm:"uniqueIndex:idx_unique_import_id;column:import_id;type:varchar(64)" json:"importId"` // Business Primary Key
	DocId        string `gorm:"column:doc_id;type:varchar(64);not null;index:idx_doc_id" json:"docId"`
	Status       int    `` /* 142-byte string literal not displayed */
	SuccessCount int    `gorm:"column:success_count;type:bigint(20);default:0;comment:'成功数量'" json:"successCount"`
	TotalCount   int    `` /* 143-byte string literal not displayed */
	ErrorMsg     string `gorm:"column:error_msg;type:longtext;not null;comment:'解析的错误信息'" json:"errorMsg"`
	ImportParams string `gorm:"column:import_params;type:text;not null;comment:'导入信息'" json:"importParams"`
	CreatedAt    int64  `gorm:"column:create_at;type:bigint(20);not null;autoCreateTime:milli" json:"createAt"` // Create Time
	UpdatedAt    int64  `gorm:"column:update_at;type:bigint(20);not null;autoUpdateTime:milli" json:"updateAt"` // Update Time
	UserId       string `gorm:"column:user_id;type:varchar(64);not null;default:'';" json:"userId"`
	OrgId        string `gorm:"column:org_id;type:varchar(64);not null;default:''" json:"orgId"`
}

func (DocSegmentImportTask) TableName added in v0.2.1

func (DocSegmentImportTask) TableName() string

type GraphStatus added in v0.2.7

type GraphStatus int

type KnowledgeBase

type KnowledgeBase struct {
	Id                   uint32       `gorm:"column:id;primary_key;type:bigint(20) auto_increment;not null;comment:'id';" json:"id"`       // Primary Key
	KnowledgeId          string       `gorm:"uniqueIndex:idx_unique_knowledge_id;column:knowledge_id;type:varchar(64)" json:"knowledgeId"` // Business Primary Key
	Name                 string       `gorm:"column:name;index:idx_user_id_name,priority:2;type:varchar(256);not null;default:''" json:"name"`
	RagName              string       `gorm:"column:rag_name;type:varchar(256);not null;default:''" json:"ragName"`
	Description          string       `gorm:"column:description;type:text;comment:'知识库描述';" json:"description"`
	DocCount             int          `gorm:"column:doc_count;type:int(11);not null;default:0;comment:'文档数量';" json:"docCount"`
	ShareCount           int          `gorm:"column:share_count;type:int(11);not null;default:0;comment:'文档共享数量';" json:"shareCount"`
	DocSize              int64        `gorm:"column:doc_size;type:bigint(20);not null;default:0;comment:'文档大小单位:字节';" json:"docSize"`
	EmbeddingModel       string       `gorm:"column:embedding_model;type:longtext;not null;comment:'embedding模型信息';" json:"embeddingModel"`
	KnowledgeGraphSwitch int          `` /* 176-byte string literal not displayed */
	KnowledgeGraph       string       `gorm:"column:knowledge_graph;type:longtext;not null;comment:'知识图谱配置';" json:"knowledgeGraph"`
	ReportCreateCount    int          `gorm:"column:report_create_count;type:int(11);not null;default:0;comment:'社区报告生成数量'" json:"reportCreateCount"`
	ReportStatus         ReportStatus ``                                                                  /* 254-byte string literal not displayed */
	CreatedAt            int64        `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"` // Create Time
	UpdatedAt            int64        `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"` // Update Time
	UserId               string       `gorm:"column:user_id;index:idx_user_id_name,priority:1;type:varchar(64);not null;default:'';" json:"userId"`
	OrgId                string       `gorm:"column:org_id;type:varchar(64);not null;default:'';" json:"orgId"`
	Deleted              int          `gorm:"column:deleted;type:tinyint(1);not null;default:0;comment:'是否逻辑删除';" json:"deleted"`
}

func (KnowledgeBase) TableName

func (KnowledgeBase) TableName() string

type KnowledgeDoc

type KnowledgeDoc struct {
	Id           uint32      `json:"id" gorm:"primary_key;type:bigint(20) auto_increment;not null;comment:'id';"` // Primary Key
	DocId        string      `gorm:"uniqueIndex:idx_unique_doc_id;column:doc_id;type:varchar(64)" json:"docId"`   // Business Primary Key
	ImportTaskId string      `gorm:"column:batch_id;type:varchar(64);not null;default:'';comment:'导入的任务id'" json:"importTaskId"`
	KnowledgeId  string      `` /* 175-byte string literal not displayed */
	FilePathMd5  string      `gorm:"column:file_path_md5;type:varchar(64);not null;default:'';comment:'文件的md5值'" json:"filePathMd5"`
	FilePath     string      `gorm:"column:file_path;type:text;not null" json:"filePath"`
	Name         string      `gorm:"column:name;index:idx_user_id_knowledge_id_name,priority:3;type:varchar(256);not null;default:''" json:"name"`
	FileType     string      `gorm:"column:file_type;type:varchar(20);not null;default:''" json:"fileType"`
	FileSize     int64       `gorm:"column:file_size;type:bigint(20);COMMENT:'文件大小,单位byte'" json:"fileSize"`
	Status       int         `` /* 211-byte string literal not displayed */
	GraphStatus  GraphStatus `` /* 229-byte string literal not displayed */
	ErrorMsg     string      `gorm:"column:error_msg;type:longtext;not null;comment:'解析的错误信息'" json:"errorMsg"`
	CreatedAt    int64       `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"` // Create Time
	UpdatedAt    int64       `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"` // Update Time
	UserId       string      ``                                                                  /* 166-byte string literal not displayed */
	OrgId        string      `gorm:"column:org_id;type:varchar(64);not null;default:''" json:"orgId"`
	Deleted      int         `gorm:"column:deleted;type:tinyint(1);not null;default:0;comment:'是否逻辑删除';" json:"deleted"`
}

func (KnowledgeDoc) TableName

func (KnowledgeDoc) TableName() string

type KnowledgeDocMeta added in v0.1.6

type KnowledgeDocMeta struct {
	Id          uint32 `json:"id" gorm:"primary_key;type:bigint(20) auto_increment;not null;comment:'id';"` // Primary Key
	KnowledgeId string `gorm:"index:idx_knowledge_id;column:knowledge_id;type:varchar(64);not null;default:''" json:"knowledgeId"`
	MetaId      string `gorm:"uniqueIndex:idx_unique_meta_id;column:meta_id;type:varchar(64)" json:"metaId"` // Business Primary Key
	DocId       string `gorm:"index:idx_doc_id;column:doc_id;type:varchar(64)" json:"docId"`                 // Business Primary Key
	Key         string `gorm:"index:idx_meta_key;column:key;type:varchar(64);not null;default:''" json:"key"`
	Value       string `gorm:"column:value;type:text;not null;" json:"value"`
	ValueType   string `gorm:"column:value_type;type:varchar(64);not null;default:'string';comment:'string,number,time'" json:"valueType"`
	Rule        string `gorm:"column:rule;type:text;not null;" json:"rule"`
	CreatedAt   int64  `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"` // Create Time
	UpdatedAt   int64  `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"` // Update Time
	UserId      string ``                                                                  /* 166-byte string literal not displayed */
	OrgId       string `gorm:"column:org_id;type:varchar(64);not null;default:''" json:"orgId"`
}

func (KnowledgeDocMeta) TableName added in v0.1.6

func (KnowledgeDocMeta) TableName() string

type KnowledgeImportTask

type KnowledgeImportTask struct {
	Id            uint32 `gorm:"column:id;primary_key;type:bigint(20) auto_increment;not null;comment:'id';" json:"id"`
	ImportId      string `gorm:"uniqueIndex:idx_unique_import_id;column:import_id;type:varchar(64)" json:"importId"` // Business Primary Key
	KnowledgeId   string `gorm:"column:knowledge_id;type:varchar(64);not null;index:idx_knowledge_id" json:"knowledgeId"`
	ImportType    int    `gorm:"column:import_type;type:tinyint(1);not null;" json:"importType"`
	Status        int    `` /* 170-byte string literal not displayed */
	ErrorMsg      string `gorm:"column:error_msg;type:longtext;not null;comment:'解析的错误信息'" json:"errorMsg"`
	DocInfo       string `gorm:"column:doc_info;type:longtext;not null;comment:'文件信息'" json:"docInfo"`
	SegmentConfig string `gorm:"column:segment_config;type:text;not null;comment:'分段配置信息'" json:"segmentConfig"`
	DocAnalyzer   string `gorm:"column:doc_analyzer;type:text;not null;comment:'文档解析配置'" json:"docAnalyzer"`
	OcrModelId    string `gorm:"column:ocr_model_id;type:varchar(64);not null;default:'';comment:'ocr模型id'" json:"ocrModelId"`
	DocPreProcess string `` /* 131-byte string literal not displayed */
	MetaData      string `gorm:"column:meta_data;type:text;not null;comment:'元数据列表'" json:"metaData"`
	CreatedAt     int64  `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"` // Create Time
	UpdatedAt     int64  `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"` // Update Time
	UserId        string `gorm:"column:user_id;type:varchar(64);not null;default:'';" json:"userId"`
	OrgId         string `gorm:"column:org_id;type:varchar(64);not null;default:''" json:"orgId"`
}

func (KnowledgeImportTask) TableName

func (KnowledgeImportTask) TableName() string

type KnowledgeKeywords added in v0.1.4

type KnowledgeKeywords struct {
	Id               uint32 `json:"id" gorm:"primary_key;type:bigint(20) auto_increment;not null;comment:'id';"` // Primary Key
	Name             string `json:"name" gorm:"column:name;type:varchar(255);comment:专名词"`
	Alias            string `json:"alias" gorm:"column:alias;type:varchar(255);comment:别名"`
	KnowledgeBaseIds string `json:"knowledgeBaseIds" gorm:"column:knowledge_base_ids;type:text;comment:关联的知识库id;内容格式为:[\"2\",\"3\"]"`
	UserId           string `json:"userId" gorm:"column:user_id;type:varchar(64);not null;index:idx_user_id;comment:用户id;default:''"`
	OrgId            string `json:"orgId" gorm:"column:org_id;type:varchar(64);not null;default:''"`
	CreatedAt        int64  `gorm:"autoCreateTime:milli;index:created_at;column:created_at;type:bigint" json:"createdAt"`
	UpdatedAt        int64  `gorm:"autoUpdateTime:milli;column:updated_at;type:bigint" json:"updatedAt"`
}

KnowledgeKeywords 知识库关键词映射表

func (KnowledgeKeywords) TableName added in v0.1.4

func (KnowledgeKeywords) TableName() string

type KnowledgePermission added in v0.2.5

type KnowledgePermission struct {
	Id             uint32 `json:"id" gorm:"primary_key;type:bigint(20) auto_increment;not null;comment:'id';"` // Primary Key
	PermissionId   string `gorm:"column:permission_id;uniqueIndex:idx_unique_permission_id;type:varchar(64);not null;default:''" json:"permissionId"`
	KnowledgeId    string `` /* 131-byte string literal not displayed */
	GrantUserId    string `gorm:"column:grant_user_id;type:varchar(64);not null;default:'';comment:'有权限的用户id';" json:"permissionUserId"`
	GrantOrgId     string `gorm:"column:grant_org_id;type:varchar(64);not null;default:''comment:'有权限的组织id';" json:"permissionOrgId"`
	PermissionType int    ``                                                                  /* 208-byte string literal not displayed */
	CreatedAt      int64  `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"` // Create Time
	UpdatedAt      int64  `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"` // Update Time
	OrgId          string `gorm:"column:org_id;uniqueIndex:idx_knowledge_id_org_user,priority:2;type:varchar(64);not null;default:'';" json:"orgId"`
	UserId         string `gorm:"column:user_id;uniqueIndex:idx_knowledge_id_org_user,priority:3;type:varchar(64);not null;default:'';" json:"userId"`
}

KnowledgePermission 业务唯一所以,一个知识库,一个用户,一个组织 只能有一条

func (KnowledgePermission) TableName added in v0.2.5

func (KnowledgePermission) TableName() string

type KnowledgePermissionRecord added in v0.2.5

type KnowledgePermissionRecord struct {
	Id                 uint32 `json:"id" gorm:"primary_key;type:bigint(20) auto_increment;not null;comment:'id';"` // Primary Key
	RecordId           string `gorm:"column:record_id;uniqueIndex:idx_record_id;type:varchar(64);not null;default:''" json:"recordId"`
	KnowledgeId        string `gorm:"column:knowledge_id;;type:varchar(64);not null;default:''" json:"knowledgeId"`
	Option             int    `` /* 143-byte string literal not displayed */
	OperatorUserId     string `gorm:"column:operator_user_id;type:varchar(64);not null;default:'';comment:'有权限的用户id';" json:"operatorUserId"`
	OperatorOrgId      string `gorm:"column:operator_org_id;type:varchar(64);not null;default:''comment:'有权限的组织id';" json:"operatorOrgId"`
	FromPermissionType int    `` /* 232-byte string literal not displayed */
	ToPermissionType   int    `` /* 228-byte string literal not displayed */
	OwnerOrgId         string `gorm:"column:owner_org_id;type:varchar(64);not null;default:'';" json:"ownerOrgId"`
	OwnerUserId        string `gorm:"column:owner_user_id;type:varchar(64);not null;default:'';" json:"ownerUserId"`
	CreatedAt          int64  `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"` // Create Time
	UpdatedAt          int64  `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"` // Update Time

}

KnowledgePermissionRecord 业务唯一所以,一个知识库,一个用户,一个组织 只能有一条

func (KnowledgePermissionRecord) TableName added in v0.2.5

func (KnowledgePermissionRecord) TableName() string

type KnowledgeSplitter added in v0.1.6

type KnowledgeSplitter struct {
	Id         uint32 `gorm:"column:id;primary_key;type:bigint(20) auto_increment;not null;comment:'id';" json:"id"`    // Primary Key
	SplitterId string `gorm:"uniqueIndex:idx_unique_splitter_id;column:splitter_id;type:varchar(64)" json:"splitterId"` // Business Primary Key
	Name       string `gorm:"column:name;index:idx_user_id_name,priority:2;type:varchar(64);not null;default:''" json:"name"`
	Value      string `gorm:"column:value;type:varchar(64);not null;default:''" json:"value"`
	CreatedAt  int64  `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"` // Create Time
	UpdatedAt  int64  `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"` // Update Time
	UserId     string `gorm:"column:user_id;index:idx_user_id_name,priority:1;type:varchar(64);not null;default:'';" json:"userId"`
	OrgId      string `gorm:"column:org_id;type:varchar(64);not null;default:'';" json:"orgId"`
}

func (KnowledgeSplitter) TableName added in v0.1.6

func (KnowledgeSplitter) TableName() string

type KnowledgeTag added in v0.1.3

type KnowledgeTag struct {
	Id        uint32 `gorm:"column:id;primary_key;type:bigint(20) auto_increment;not null;comment:'id';" json:"id"` // Primary Key
	TagId     string `gorm:"uniqueIndex:idx_unique_tag_id;column:tag_id;type:varchar(64)" json:"tagId"`             // Business Primary Key
	Name      string `gorm:"column:name;index:idx_user_id_name,priority:2;type:varchar(64);not null;default:''" json:"name"`
	CreatedAt int64  `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"` // Create Time
	UpdatedAt int64  `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"` // Update Time
	UserId    string `gorm:"column:user_id;index:idx_user_id_name,priority:1;type:varchar(64);not null;default:'';" json:"userId"`
	OrgId     string `gorm:"column:org_id;type:varchar(64);not null;default:'';" json:"orgId"`
}

func (KnowledgeTag) TableName added in v0.1.3

func (KnowledgeTag) TableName() string

type KnowledgeTagRelation added in v0.1.3

type KnowledgeTagRelation struct {
	Id          uint32 `gorm:"column:id;primary_key;type:bigint(20) auto_increment;not null;comment:'id';" json:"id"`               // Primary Key
	TagId       string `gorm:"column:tag_id;index:idx_tag_id;type:varchar(64);not null;default:'';" json:"tagId"`                   // tagId
	KnowledgeId string `gorm:"column:knowledge_id;index:idx_knowledge_id;type:varchar(64);not null;default:'';" json:"knowledgeId"` // knowledgeId
	CreatedAt   int64  `gorm:"column:create_at;type:bigint(20);not null;" json:"createAt"`                                          // Create Time
	UpdatedAt   int64  `gorm:"column:update_at;type:bigint(20);not null;" json:"updateAt"`                                          // Update Time
	UserId      string `gorm:"column:user_id;index:idx_user_id_tag_name,priority:1;type:varchar(64);not null;default:'';" json:"userId"`
	OrgId       string `gorm:"column:org_id;type:varchar(64);not null;default:'';" json:"orgId"`
}

func (KnowledgeTagRelation) TableName added in v0.1.3

func (KnowledgeTagRelation) TableName() string

type ReportStatus added in v0.2.7

type ReportStatus int
const (
	ReportInit          ReportStatus = 0   //社区报告未处理
	ReportSuccess       ReportStatus = 120 //社区报告生成成功
	ReportLoadFail      ReportStatus = 121 //社区报告加载失败
	ReportExtractFail   ReportStatus = 122 //社区报告生成失败
	ReportStoreFail     ReportStatus = 123 //社区报告持久化存储失败
	ReportProcessing    ReportStatus = 130 //社区报告生成中
	ReportInterruptFail ReportStatus = 139 //社区报告处理中断
)

type SegmentConfig

type SegmentConfig struct {
	SegmentMethod  string   `json:"segmentMethod"`                   ////分段方法 0:通用分段;1:父子分段,字符串为空则认为是通用分段
	SegmentType    string   `json:"segmentType" validate:"required"` //分段方式 0:自定分段;1:自定义分段
	Splitter       []string `json:"splitter"`                        // 分隔符(只有自定义分段必填)
	MaxSplitter    int      `json:"maxSplitter"`                     // 可分隔最大值(只有自定义分段必填)
	Overlap        float32  `json:"overlap"`                         // 可重叠值(只有自定义分段必填)
	SubSplitter    []string `json:"subSplitter"`                     // 分隔符(只有父子分段必填)
	SubMaxSplitter int      `json:"subMaxSplitter"`                  // 可分隔最大值(只有父子分段必填)
}

type UpdateKeys added in v0.2.3

type UpdateKeys struct {
	OldKey string `json:"oldKey"`
	NewKey string `json:"newKey"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL