Move item registry reconciliation into shared operations
This commit is contained in:
@@ -700,6 +700,10 @@ later response cannot recover an earlier proposal's output or findings.
|
|||||||
|
|
||||||
## Stage 18 — Migrate Item Registry Normalization
|
## Stage 18 — Migrate Item Registry Normalization
|
||||||
|
|
||||||
|
**Status:** Complete. Item reconciliation uses the shared facility; focused
|
||||||
|
tests pass for currency compatibility, proposal replacement, fallback, and
|
||||||
|
evaluation evidence. Location reconciliation remains scheduled below.
|
||||||
|
|
||||||
**Goal:** Exercise richer compatibility and omission guidance without family switches.
|
**Goal:** Exercise richer compatibility and omission guidance without family switches.
|
||||||
|
|
||||||
**Inspect:** `dnd/normalize/itemregistry`, currency compatibility/application
|
**Inspect:** `dnd/normalize/itemregistry`, currency compatibility/application
|
||||||
|
|||||||
@@ -57,27 +57,40 @@ func TestNormalizationCaptureRetainsFixedMappingAndEveryProposal(t *testing.T) {
|
|||||||
if err != nil || result.Outcome.Disposition != contracts.ProducerAccepted {
|
if err != nil || result.Outcome.Disposition != contracts.ProducerAccepted {
|
||||||
t.Fatalf("normalization: %#v %v", result, err)
|
t.Fatalf("normalization: %#v %v", result, err)
|
||||||
}
|
}
|
||||||
content, err := os.ReadFile(filepath.Join(recorder.Path(), "normalization", "originals.json"))
|
content, err := os.ReadFile(filepath.Join(recorder.Path(), "preparation-domain.json"))
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
var originals dnd.ItemRegistry
|
|
||||||
if err := json.Unmarshal(content, &originals); err != nil || len(originals.Items) != 3 {
|
|
||||||
t.Fatalf("fixed originals missing: %#v %v", originals, err)
|
|
||||||
}
|
|
||||||
content, err = os.ReadFile(filepath.Join(recorder.Path(), "normalization", "preparation.json"))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
var preparation struct {
|
var preparation struct {
|
||||||
|
Originals dnd.ItemRegistry `json:"originals"`
|
||||||
Mappings []any `json:"candidate_mappings"`
|
Mappings []any `json:"candidate_mappings"`
|
||||||
}
|
}
|
||||||
if err := json.Unmarshal(content, &preparation); err != nil || len(preparation.Mappings) != 3 {
|
if err := json.Unmarshal(content, &preparation); err != nil || len(preparation.Originals.Items) != 3 || len(preparation.Mappings) != 3 {
|
||||||
t.Fatalf("fixed handle mapping missing: %s %v", content, err)
|
t.Fatalf("fixed handle mapping missing: %s %v", content, err)
|
||||||
}
|
}
|
||||||
proposals, err := os.ReadDir(filepath.Join(recorder.Path(), "normalization", "proposals"))
|
entries, err := os.ReadDir(filepath.Join(recorder.Path(), "interpretations"))
|
||||||
if err != nil || len(proposals) != 2 {
|
if err != nil {
|
||||||
t.Fatalf("revised proposals lost: %v %v", proposals, err)
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
var proposals int
|
||||||
|
for _, entry := range entries {
|
||||||
|
if !strings.HasSuffix(entry.Name(), "-domain.json") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
content, err := os.ReadFile(filepath.Join(recorder.Path(), "interpretations", entry.Name()))
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
var evaluation struct {
|
||||||
|
Proposal json.RawMessage `json:"proposal"`
|
||||||
|
}
|
||||||
|
if err := json.Unmarshal(content, &evaluation); err != nil || len(evaluation.Proposal) == 0 {
|
||||||
|
t.Fatalf("proposal evidence = %s, %v", content, err)
|
||||||
|
}
|
||||||
|
proposals++
|
||||||
|
}
|
||||||
|
if proposals != 2 {
|
||||||
|
t.Fatalf("revised proposals lost: %d", proposals)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import (
|
|||||||
"gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/items/identity"
|
"gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/items/identity"
|
||||||
"gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/shared"
|
"gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/shared"
|
||||||
"gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/shared/diagnostics"
|
"gitea.maximumdirect.net/eric/notarius/internal/modules/dnd/shared/diagnostics"
|
||||||
"go.maximumdirect.net/promptkit"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -41,152 +40,95 @@ var _ contracts.Normalizer[dnd.ItemRegistry] = (*Normalizer)(nil)
|
|||||||
|
|
||||||
type Options struct{}
|
type Options struct{}
|
||||||
|
|
||||||
type Normalizer struct {
|
type Normalizer struct{}
|
||||||
engine *promptkit.Engine
|
|
||||||
}
|
|
||||||
|
|
||||||
func New(engine *promptkit.Engine, _ Options) (*Normalizer, error) {
|
func New(_ Options) (*Normalizer, error) {
|
||||||
if engine == nil {
|
return &Normalizer{}, nil
|
||||||
return nil, normalizerErrorf("native engine must not be nil")
|
|
||||||
}
|
|
||||||
return &Normalizer{engine: engine}, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Normalizer) Key() string { return Key }
|
func (n *Normalizer) Key() string { return Key }
|
||||||
func (n *Normalizer) ReferenceSlots() []contracts.ReferenceSlot { return nil }
|
func (n *Normalizer) ReferenceSlots() []contracts.ReferenceSlot { return nil }
|
||||||
|
|
||||||
func (n *Normalizer) Normalize(ctx context.Context, req contracts.TypedNormalizeRequest[dnd.ItemRegistry]) (contracts.TypedNormalizeResult[dnd.ItemRegistry], error) {
|
type reconciliationFindings struct {
|
||||||
if n == nil {
|
observations []diagnostics.Finding
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("normalizer must not be nil")
|
advisories []diagnostics.Finding
|
||||||
}
|
}
|
||||||
if n.engine == nil {
|
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("native engine must not be nil")
|
func (n *Normalizer) PrepareNormalize(ctx context.Context, req contracts.NormalizeInput[dnd.ItemRegistry]) (contracts.PreparedOperation[dnd.ItemRegistry], error) {
|
||||||
}
|
if n == nil {
|
||||||
if ctx == nil {
|
return nil, normalizerErrorf("normalizer must not be nil")
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("context must not be nil")
|
}
|
||||||
}
|
if ctx == nil {
|
||||||
if err := ctx.Err(); err != nil {
|
return nil, normalizerErrorf("context must not be nil")
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("context error before normalize: %w", err)
|
}
|
||||||
}
|
if err := ctx.Err(); err != nil {
|
||||||
if req.Source == nil {
|
return nil, normalizerErrorf("context error before normalize: %w", err)
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("source document must not be nil")
|
}
|
||||||
|
if req.Source == nil {
|
||||||
|
return nil, normalizerErrorf("source document must not be nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep the already available merged artifact separate from preprocessed
|
|
||||||
// originals. A failed native response must not recover an earlier proposal.
|
|
||||||
merged := cloneRegistry(req.MergeOutput.Value)
|
merged := cloneRegistry(req.MergeOutput.Value)
|
||||||
order := shared.NewSourceRefOrder(req.Source)
|
order := shared.NewSourceRefOrder(req.Source)
|
||||||
records, baseFindings := preprocessRecords(merged, order)
|
records, baseFindings := preprocessRecords(merged, order)
|
||||||
deterministic := recordList(records)
|
var envelopes []semanticreconcile.Record[dnd.Item]
|
||||||
if err := req.Operation.Execution.RecordEvidence("normalization/originals.json", deterministic); err != nil {
|
input := semanticreconcile.OperationInput[dnd.ItemRegistry, normalizedRecord, reconciliationFindings]{
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, err
|
Source: req.Source, Original: merged, Deterministic: recordList(records), BaseFindings: reconciliationFindings{observations: baseFindings}, Records: records,
|
||||||
|
Limits: semanticreconcile.DefaultLimits(), PromptID: PromptID, CorrectionID: CorrectionPromptID, ProfileID: req.LLMProfile, SessionID: req.SessionID,
|
||||||
|
Project: func(records []normalizedRecord) ([]semanticreconcile.Candidate, error) {
|
||||||
|
candidates, prepared, err := reconciliationInputs(records)
|
||||||
|
envelopes = prepared
|
||||||
|
if err != nil {
|
||||||
|
return nil, normalizerErrorf("prepare semantic reconciliation inputs: %w", err)
|
||||||
}
|
}
|
||||||
findings := append([]diagnostics.Finding(nil), baseFindings...)
|
return candidates, nil
|
||||||
var advisories []diagnostics.Finding
|
},
|
||||||
discardedGroups := -1
|
Apply: func(_ context.Context, plan semanticreconcile.Plan, records []normalizedRecord) (semanticreconcile.Application[dnd.ItemRegistry, reconciliationFindings], error) {
|
||||||
var omissionDetails []string
|
applied, findings, advisories, rejected, err := applyReconciliationPlan(plan, records, envelopes, order)
|
||||||
|
if err != nil {
|
||||||
fallback := func(_ context.Context, final *dnd.ItemRegistry) (dnd.ItemRegistry, error) {
|
return semanticreconcile.Application[dnd.ItemRegistry, reconciliationFindings]{}, normalizerErrorf("apply semantic reconciliation plan: %w", err)
|
||||||
value := cloneRegistry(merged)
|
}
|
||||||
|
result := semanticreconcile.Application[dnd.ItemRegistry, reconciliationFindings]{Value: recordList(applied),
|
||||||
|
Findings: reconciliationFindings{observations: append(append([]diagnostics.Finding(nil), baseFindings...), findings...), advisories: advisories}, OmittedGroups: rejected}
|
||||||
|
if rejected > 0 {
|
||||||
|
result.Guidance = []string{"Consolidate currency only with aliases of the same denomination; keep different denominations separate and do not combine currency with non-currency items."}
|
||||||
|
result.OmissionDetails = []string{"currency may only be consolidated with aliases of one denomination"}
|
||||||
|
}
|
||||||
|
return result, nil
|
||||||
|
},
|
||||||
|
Fallback: func(_ context.Context, original dnd.ItemRegistry, final *semanticreconcile.Evaluation[dnd.ItemRegistry, reconciliationFindings]) (dnd.ItemRegistry, error) {
|
||||||
|
value := cloneRegistry(original)
|
||||||
if final != nil {
|
if final != nil {
|
||||||
// Each interpreted candidate was built afresh from fixed original records,
|
value = cloneRegistry(final.Candidate)
|
||||||
// using only the final proposal's compatible, non-overlapping safe groups.
|
|
||||||
value = cloneRegistry(*final)
|
|
||||||
} else {
|
|
||||||
findings, advisories = nil, nil
|
|
||||||
discardedGroups = -1
|
|
||||||
omissionDetails = nil
|
|
||||||
}
|
}
|
||||||
if err := validateFallback(value, req.Source); err != nil {
|
if err := validateFallback(value, req.Source); err != nil {
|
||||||
return dnd.ItemRegistry{}, err
|
return dnd.ItemRegistry{}, err
|
||||||
}
|
}
|
||||||
return value, nil
|
return value, nil
|
||||||
|
},
|
||||||
|
Diagnostics: func(final *semanticreconcile.Evaluation[dnd.ItemRegistry, reconciliationFindings], outcome contracts.ProducerOutcome) ([]contracts.ProducerDiagnostic, error) {
|
||||||
|
var findings reconciliationFindings
|
||||||
|
discarded := -1
|
||||||
|
var details []string
|
||||||
|
if final != nil {
|
||||||
|
findings, discarded, details = final.Findings, final.OmittedGroups, append([]string(nil), final.OmissionDetails...)
|
||||||
}
|
}
|
||||||
finish := func(value dnd.ItemRegistry, outcome contracts.ProducerOutcome, err error) (contracts.TypedNormalizeResult[dnd.ItemRegistry], error) {
|
result, err := normalizationResult(dnd.ItemRegistry{}, findings.observations, findings.advisories)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("normalize items: %w", err)
|
return nil, err
|
||||||
}
|
}
|
||||||
result, err := normalizationResult(value, findings, advisories)
|
|
||||||
if err != nil {
|
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, err
|
|
||||||
}
|
|
||||||
result.Outcome = outcome
|
|
||||||
if outcome.Disposition == contracts.ProducerFallback {
|
if outcome.Disposition == contracts.ProducerFallback {
|
||||||
details := append([]string(nil), omissionDetails...)
|
|
||||||
details = append(details, outcome.FallbackReason)
|
details = append(details, outcome.FallbackReason)
|
||||||
groups, err := diagnostics.Collect([]diagnostics.Finding{semanticFallbackFinding(discardedGroups, details...)}, contracts.DiagnosticDispositionWarning, contracts.DiagnosticCategoryFallback)
|
groups, err := diagnostics.Collect([]diagnostics.Finding{semanticFallbackFinding(discarded, details...)}, contracts.DiagnosticDispositionWarning, contracts.DiagnosticCategoryFallback)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("collect fallback diagnostic: %w", err)
|
return nil, normalizerErrorf("collect fallback diagnostic: %w", err)
|
||||||
}
|
}
|
||||||
result.Diagnostics = append(result.Diagnostics, groups...)
|
result.Diagnostics = append(result.Diagnostics, groups...)
|
||||||
}
|
}
|
||||||
return result, nil
|
return result.Diagnostics, nil
|
||||||
}
|
|
||||||
noModel := func() (contracts.TypedNormalizeResult[dnd.ItemRegistry], error) {
|
|
||||||
value, outcome, err := pipeline.AssessProducer(ctx, req.Operation, deterministic, func(ctx context.Context) (dnd.ItemRegistry, error) { return fallback(ctx, nil) })
|
|
||||||
return finish(value, outcome, err)
|
|
||||||
}
|
|
||||||
if len(records) < 2 {
|
|
||||||
return noModel()
|
|
||||||
}
|
|
||||||
candidates, envelopes, err := reconciliationInputs(records)
|
|
||||||
if err != nil {
|
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("prepare semantic reconciliation inputs: %w", err)
|
|
||||||
}
|
|
||||||
preparation, err := semanticreconcile.Prepare(req.Source, candidates, semanticreconcile.DefaultLimits())
|
|
||||||
if err != nil {
|
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("prepare semantic reconciliation: %w", err)
|
|
||||||
}
|
|
||||||
if err := req.Operation.Execution.RecordEvidence("normalization/preparation.json", map[string]any{
|
|
||||||
"disposition": preparation.Disposition(), "candidate_number_range": preparation.CandidateNumberRange(),
|
|
||||||
"candidate_mappings": preparation.CandidateMappings(), "candidates": candidates,
|
|
||||||
}); err != nil {
|
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, err
|
|
||||||
}
|
|
||||||
switch preparation.Disposition() {
|
|
||||||
case semanticreconcile.InsufficientCandidates:
|
|
||||||
return noModel()
|
|
||||||
case semanticreconcile.LimitExceeded:
|
|
||||||
value, outcome, err := pipeline.FinishProducerFailure(ctx, req.Operation.Controls.Mode, normalizerErrorf("candidate set exceeded semantic reconciliation preparation limits"), func(ctx context.Context) (dnd.ItemRegistry, error) { return fallback(ctx, nil) })
|
|
||||||
return finish(value, outcome, err)
|
|
||||||
}
|
|
||||||
initial, err := semanticreconcile.InitialRequest(preparation, PromptID, req.LLMProfile, req.SessionID)
|
|
||||||
if err != nil {
|
|
||||||
return contracts.TypedNormalizeResult[dnd.ItemRegistry]{}, normalizerErrorf("build native request: %w", err)
|
|
||||||
}
|
|
||||||
value, outcome, err := pipeline.RunProducer(ctx, n.engine, req.Operation, initial,
|
|
||||||
func(_ context.Context, result *promptkit.RunResult) (*dnd.ItemRegistry, []string, error) {
|
|
||||||
response, err := semanticreconcile.DecodeProposal(result.RawOutput)
|
|
||||||
if err != nil {
|
|
||||||
return nil, nil, err
|
|
||||||
}
|
|
||||||
assessment := preparation.Assess(response)
|
|
||||||
if err := req.Operation.Execution.RecordEvidence("normalization/proposals/"+result.RunID+".json", map[string]any{"proposal": response, "issues": assessment.Issues(), "discarded_group_count": assessment.DiscardedGroupCount()}); err != nil {
|
|
||||||
return nil, nil, err
|
|
||||||
}
|
|
||||||
applied, semanticFindings, advisoryFindings, rejectedGroups, err := applyReconciliationPlan(assessment.Plan(), records, envelopes, order)
|
|
||||||
if err != nil {
|
|
||||||
return nil, nil, normalizerErrorf("apply semantic reconciliation plan: %w", err)
|
|
||||||
}
|
|
||||||
findings = append(append([]diagnostics.Finding(nil), baseFindings...), semanticFindings...)
|
|
||||||
advisories = advisoryFindings
|
|
||||||
discardedGroups = assessment.DiscardedGroupCount() + rejectedGroups
|
|
||||||
omissionDetails = semanticreconcile.IssueDetails(assessment.Issues())
|
|
||||||
guidance, err := semanticreconcile.CorrectionDetails(assessment.Issues(), preparation.CandidateNumberRange())
|
|
||||||
if err != nil {
|
|
||||||
return nil, nil, err
|
|
||||||
}
|
|
||||||
if rejectedGroups > 0 {
|
|
||||||
guidance = append(guidance, "Consolidate currency only with aliases of the same denomination; keep different denominations separate and do not combine currency with non-currency items.")
|
|
||||||
omissionDetails = append(omissionDetails, "currency may only be consolidated with aliases of one denomination")
|
|
||||||
}
|
|
||||||
candidate := recordList(applied)
|
|
||||||
return &candidate, guidance, nil
|
|
||||||
},
|
},
|
||||||
func(_ context.Context, guidance []string) (promptkit.RunRequest, error) {
|
}
|
||||||
return semanticreconcile.CorrectionRequest(CorrectionPromptID, req.LLMProfile, req.SessionID, guidance), nil
|
return semanticreconcile.PrepareOperation(input)
|
||||||
}, fallback)
|
|
||||||
return finish(value, outcome, err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// validateFallback checks the durable artifact and the identity/source invariants
|
// validateFallback checks the durable artifact and the identity/source invariants
|
||||||
@@ -389,7 +331,7 @@ func Register(registry *pipeline.NormalizerRegistry) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return New(request.Dependencies.Engine, options)
|
return New(options)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
func validateOptions(options map[string]any) error { _, err := DecodeOptions(options); return err }
|
func validateOptions(options map[string]any) error { _, err := DecodeOptions(options); return err }
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ func TestModuleContractAndNativeDependencies(t *testing.T) {
|
|||||||
if err := Register(registry); err != nil {
|
if err := Register(registry); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if _, err := New(nil, Options{}); err == nil {
|
|
||||||
t.Fatal("New() accepted nil native engine")
|
|
||||||
}
|
|
||||||
got := ModuleSpec()
|
got := ModuleSpec()
|
||||||
got.Prompts[0] = "caller mutation"
|
got.Prompts[0] = "caller mutation"
|
||||||
if !reflect.DeepEqual(ModuleSpec(), want) {
|
if !reflect.DeepEqual(ModuleSpec(), want) {
|
||||||
@@ -427,7 +424,12 @@ func (c *recordingNormalizerClient) Generate(ctx context.Context, request prompt
|
|||||||
return &promptkit.GenerateResponse{Content: response}, nil
|
return &promptkit.GenerateResponse{Content: response}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newNormalizer(t *testing.T, client promptkit.LLMClient) *Normalizer {
|
type normalizerFixture struct {
|
||||||
|
*Normalizer
|
||||||
|
engine *promptkit.Engine
|
||||||
|
}
|
||||||
|
|
||||||
|
func newNormalizer(t *testing.T, client promptkit.LLMClient) *normalizerFixture {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
type settings struct {
|
type settings struct {
|
||||||
PromptKit promptkit.Settings `yaml:"promptkit"`
|
PromptKit promptkit.Settings `yaml:"promptkit"`
|
||||||
@@ -451,11 +453,20 @@ func newNormalizer(t *testing.T, client promptkit.LLMClient) *Normalizer {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
normalizer, err := New(engine, Options{})
|
normalizer, err := New(Options{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
return normalizer
|
return &normalizerFixture{Normalizer: normalizer, engine: engine}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fixture *normalizerFixture) Normalize(ctx context.Context, req contracts.TypedNormalizeRequest[dnd.ItemRegistry]) (pipeline.OperationResult[dnd.ItemRegistry], error) {
|
||||||
|
op := req.Operation
|
||||||
|
execution := pipeline.ExecutionContext[dnd.ItemRegistry]{Engine: fixture.engine, Controls: op.Controls, Assess: op.Assess, Execution: op.Execution, ReuseEligible: op.ReuseEligible, Cache: op.Cache}
|
||||||
|
input := contracts.NormalizeInput[dnd.ItemRegistry]{Source: req.Source, LaneID: req.LaneID, MergeOutput: req.MergeOutput, SourceInput: req.SourceInput, SessionID: req.SessionID, References: req.References, LLMProfile: req.LLMProfile, Metadata: req.Metadata}
|
||||||
|
return pipeline.ExecuteOperation(ctx, execution, func(ctx context.Context) (contracts.PreparedOperation[dnd.ItemRegistry], error) {
|
||||||
|
return fixture.Normalizer.PrepareNormalize(ctx, input)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func renderedInput(t *testing.T, request promptkit.GenerateRequest, name string) []byte {
|
func renderedInput(t *testing.T, request promptkit.GenerateRequest, name string) []byte {
|
||||||
|
|||||||
Reference in New Issue
Block a user