Construct prompt engines from shared configuration

This commit is contained in:
2026-11-23 04:23:59 +00:00
parent 1ca5011049
commit 9977cd9130
21 changed files with 153 additions and 253 deletions

View File

@@ -11,7 +11,7 @@ import (
"strings"
"testing"
"gitea.maximumdirect.net/eric/audita/v4/internal/core/config"
"gitea.maximumdirect.net/eric/audita/v4/internal/appconfig"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/llm"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/outcomes"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/proposals"
@@ -84,7 +84,7 @@ func testValidationClient(t *testing.T, transport http.RoundTripper) structuredo
if err := os.WriteFile(filepath.Join(dir, "prompts.yml"), []byte("profiles:\n - {id: base, endpoint: 'https://example.invalid/v1', model: local-model, api_key_required: false}\n"), 0600); err != nil {
t.Fatal(err)
}
loaded, err := config.Load(ck.Input{Source: ck.File(main)}, "")
loaded, _, err := appconfig.Load(context.Background(), ck.Input{Source: ck.File(main)}, "")
if err != nil {
t.Fatal(err)
}
@@ -92,7 +92,7 @@ func testValidationClient(t *testing.T, transport http.RoundTripper) structuredo
if err != nil {
t.Fatal(err)
}
settings := loaded.Config.LLM
settings := loaded.Config.Application.LLM
settings.TransientRetries, settings.RepairAttempts = 0, 1
client, err := runtime.NewRoleClient("validation", "base", settings, llm.CallHooks{})
if err != nil {