router: Router.Route consumes NormalizedInput directly (slice 11)
Change Route from (ctx, utterance string, now) to (ctx, input NormalizedInput, now). The ingress-constructed NormalizedInput now reaches the cascade intact — no reconstruction downstream. TryFastPath receives the same input, not a rebuilt one. All callers (production, eval framework, tests) updated to construct NormalizedInput.
This commit is contained in:
@@ -214,7 +214,7 @@ func ScoreReach(ctx context.Context, name string, r Router, m router.ActMatcher,
|
||||
|
||||
for _, c := range f.Cases {
|
||||
start := time.Now()
|
||||
d, err := r.Route(ctx, c.Utterance, now)
|
||||
d, err := r.Route(ctx, router.NormalizedInput{Text: c.Utterance}, now)
|
||||
o := ReachOutcome{Case: c, Decision: d, Err: err, Latency: time.Since(start)}
|
||||
lat = append(lat, o.Latency)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user