MCPcopy Create free account
hub / github.com/53AI/53AIHub / NewChunkConfigService

Function NewChunkConfigService

api/service/rag/config.go:139–146  ·  view source on GitHub ↗

NewChunkConfigService 创建分块配置服务

(db *gorm.DB)

Source from the content-addressed store, hash-verified

137
138// NewChunkConfigService 创建分块配置服务
139func NewChunkConfigService(db *gorm.DB) *ChunkConfigService {
140 return &ChunkConfigService{
141 db: db,
142 configCache: make(map[string]*ChunkConfig),
143 missingConfigCache: make(map[string]struct{}),
144 systemConfigCache: make(map[string]*ChunkConfig),
145 }
146}
147
148// GetConfig 获取分块配置(支持4层级联:默认 → 站点 → 知识库 → 文档)GetConfig
149func (s *ChunkConfigService) GetConfig(eid int64, libraryID *int64, chunkType string) (*ChunkConfig, error) {

Callers 15

NewLibrarySearchServiceFunction · 0.85
getSearchConfigMethod · 0.85
ProcessChunkEmbeddingMethod · 0.85
IndexEntityMethod · 0.85
SearchEntitiesMethod · 0.85
SearchEntityFilesMethod · 0.85
BatchIndexEntitiesMethod · 0.85
NewChunkerServiceFunction · 0.85
SearchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected