Make PromptKit profile handling safer and more consistent
This commit is contained in:
@@ -24,10 +24,6 @@ func NewChunkerRegistry() *ChunkerRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
func (r *ChunkerRegistry) Register(key string, constructor ChunkerConstructor) error {
|
||||
return r.RegisterWithSpec(defaultModuleSpec(key, StageChunk), constructor)
|
||||
}
|
||||
|
||||
func (r *ChunkerRegistry) RegisterWithSpec(spec ModuleSpec, constructor ChunkerConstructor) error {
|
||||
if constructor == nil {
|
||||
return fmt.Errorf("chunker constructor for %q must not be nil", strings.TrimSpace(spec.Key))
|
||||
|
||||
Reference in New Issue
Block a user