Load native PromptKit settings through application configuration version six
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
package config
|
||||
|
||||
import "gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
|
||||
import (
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
|
||||
"go.maximumdirect.net/promptkit"
|
||||
)
|
||||
|
||||
// Document is the version 5 configuration shape decoded by ConfigKit. It is
|
||||
// Document is the version 6 configuration shape decoded by ConfigKit. It is
|
||||
// deliberately separate from Config so YAML presence and composition concerns
|
||||
// do not reach runtime pipeline types.
|
||||
type Document struct {
|
||||
Version string `yaml:"version"`
|
||||
PromptKit *PromptKitDocument `yaml:"promptkit,omitempty"`
|
||||
PromptKit promptkit.Settings `yaml:"promptkit"`
|
||||
Pipelines map[string]PipelineDocument `yaml:"pipelines,omitempty"`
|
||||
Concurrency *ConcurrencyDocument `yaml:"concurrency,omitempty"`
|
||||
Output *OutputDocument `yaml:"output,omitempty"`
|
||||
@@ -15,18 +18,6 @@ type Document struct {
|
||||
Debug *DebugDocument `yaml:"debug,omitempty"`
|
||||
}
|
||||
|
||||
type PromptKitDocument struct {
|
||||
ProfileDir *string `yaml:"profile_dir,omitempty"`
|
||||
ProfileFile *string `yaml:"profile_file,omitempty"`
|
||||
TransientRetries *int `yaml:"transient_retries,omitempty"`
|
||||
LocalBackend *PromptKitLocalBackendDocument `yaml:"local_backend,omitempty"`
|
||||
}
|
||||
|
||||
type PromptKitLocalBackendDocument struct {
|
||||
Endpoint *string `yaml:"endpoint,omitempty"`
|
||||
ConcurrencyLimit *int `yaml:"concurrency_limit,omitempty"`
|
||||
}
|
||||
|
||||
type PipelineDocument struct {
|
||||
LLMProfile *string `yaml:"llm_profile,omitempty"`
|
||||
StructuredOutputRepairAttempts *int `yaml:"structured_output_repair_attempts,omitempty"`
|
||||
@@ -75,7 +66,7 @@ type ValidatorDocument struct {
|
||||
Options map[string]any `yaml:"options,omitempty"`
|
||||
}
|
||||
|
||||
// ReferenceDocument is the explicit version 5 union. Later document
|
||||
// ReferenceDocument is the explicit version 6 union. Later document
|
||||
// validation establishes which locations permit generated references and
|
||||
// requires exactly one populated branch.
|
||||
type ReferenceDocument struct {
|
||||
|
||||
Reference in New Issue
Block a user