Keep conversational replies semantically grounded
This commit is contained in:
@@ -629,7 +629,7 @@ func main() {
|
||||
activeFocusName = previousFocus.ProjectDisplayName
|
||||
activeFocusProvenance = previousFocus.Provenance
|
||||
}
|
||||
planningReply := identityReply
|
||||
planningReply := semantic.Reply
|
||||
workPlanned := false
|
||||
needsCognition := semantic.NeedsCognition
|
||||
projectID := ""
|
||||
@@ -802,12 +802,13 @@ func main() {
|
||||
ConfidenceMillis: semantic.Interpretation.ConfidenceMillis,
|
||||
})
|
||||
cancelReview()
|
||||
stableSemanticReply := identityReply != "" || semantic.Interpretation.SpeechAct == interaction.SpeechActConversational || semantic.Interpretation.SpeechAct == interaction.SpeechActConfirmation || semantic.Interpretation.SpeechAct == interaction.SpeechActRejection
|
||||
if reviewErr != nil {
|
||||
log.Printf("cognitive response review unavailable: %v", reviewErr)
|
||||
} else if identityReply == "" {
|
||||
} else if !stableSemanticReply {
|
||||
planningReply = reviewedReply
|
||||
} else if reviewedReply != planningReply {
|
||||
log.Printf("cognitive response review proposed identity rewrite; preserving semantic identity reply")
|
||||
log.Printf("cognitive response review proposed stable semantic rewrite; preserving semantic reply")
|
||||
}
|
||||
}
|
||||
response := interaction.ChatMessageResponse{
|
||||
|
||||
Reference in New Issue
Block a user