Make production registration asset-free and verify direct deterministic execution
This commit is contained in:
@@ -4,7 +4,6 @@ package register
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/framework/llm"
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
|
||||
)
|
||||
|
||||
@@ -13,9 +12,9 @@ type registration struct {
|
||||
register func() error
|
||||
}
|
||||
|
||||
// Register adds all production D&D modules, validators, policy, and assets.
|
||||
func Register(registries pipeline.Registries, assets *llm.AssetRegistry) error {
|
||||
if err := validateRegistries(registries, assets); err != nil {
|
||||
// Register adds all production D&D modules, validators, and policy.
|
||||
func Register(registries pipeline.Registries) error {
|
||||
if err := validateRegistries(registries); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := registerModules(registries); err != nil {
|
||||
@@ -27,12 +26,6 @@ func Register(registries pipeline.Registries, assets *llm.AssetRegistry) error {
|
||||
if err := registerValidators(registries); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := registerPromptAssets(assets); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := registerFallbackProfiles(assets); err != nil {
|
||||
return err
|
||||
}
|
||||
return registerDefaultChains(registries.ValidatorChains)
|
||||
}
|
||||
|
||||
@@ -45,7 +38,7 @@ func runRegistrations(registrations []registration) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateRegistries(registries pipeline.Registries, assets *llm.AssetRegistry) error {
|
||||
func validateRegistries(registries pipeline.Registries) error {
|
||||
switch {
|
||||
case registries.Chunkers == nil:
|
||||
return fmt.Errorf("dnd registrar: chunker registry must not be nil")
|
||||
@@ -63,8 +56,6 @@ func validateRegistries(registries pipeline.Registries, assets *llm.AssetRegistr
|
||||
return fmt.Errorf("dnd registrar: validator registry must not be nil")
|
||||
case registries.ValidatorChains == nil:
|
||||
return fmt.Errorf("dnd registrar: validator chain registry must not be nil")
|
||||
case assets == nil:
|
||||
return fmt.Errorf("dnd registrar: asset registry must not be nil")
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user