Move cognition-first interpretation for free-form Russian
CI / test (push) Failing after 14s

This commit is contained in:
m
2026-08-18 16:40:46 +03:00
parent 11a6a23f6e
commit 52074e2895
8 changed files with 312 additions and 193 deletions
+2 -7
View File
@@ -61,12 +61,7 @@ func (c cognitiveInterpretationClient) Interpret(ctx context.Context, request co
}
func shouldRequestBroaderInterpretation(result interactiondomain.SemanticResult) bool {
switch result.Interpretation.Applicability {
case interaction.SemanticNeedsBroaderInterpret, interaction.SemanticLowConfidence, interaction.SemanticMixedIntent:
return true
default:
return false
}
return interactiondomain.ShouldAttemptCognitive(result)
}
func buildGatewayInterpretationRequest(session identity.CreatorSession, utterance interaction.HumanUtterance, semantic interactiondomain.SemanticResult, projectNames []string) cognitive.GatewayInterpretationRequest {
@@ -122,4 +117,4 @@ func capabilityHintStrings(values []capability.CapabilityKind) []string {
result = append(result, string(value))
}
return result
}
}
+2 -2
View File
@@ -293,7 +293,7 @@ func main() {
http.Error(w, "interpret chat message", http.StatusServiceUnavailable)
return
}
if shouldRequestBroaderInterpretation(semantic) {
if interactiondomain.ShouldAttemptCognitive(semantic) {
projectNames := make([]string, 0, len(semantic.Projects))
for _, ref := range semantic.Projects {
if ref.ProjectDisplayName != "" {
@@ -1170,4 +1170,4 @@ func evidenceRefsToEpistemics(values []work.EvidenceRef) []epistemics.EvidenceRe
result = append(result, epistemics.EvidenceRef(value))
}
return result
}
}