router, mavend: a complaint about a thing is not a fact about him (V-481)
"сеть какая-то медленная" and "интернет не работает" were written as `self` rows at confidence 1.00. Recall reads a self row back later as if it were still true, and that is the class of row that outranked live search in #470 — so a slow afternoon becomes a standing belief about his network. IsTransientComplaint is the same shape as IsQuestionShaped: deterministic, offline, and off by default in the two cases where losing a real capture would cost more than keeping a complaint. An explicit "запомни ..." wins, because he asked. A first-person marker wins, because "я сломал руку" is durable and the test is meant for sentences about things. She answers the turn as chat instead of storing it. actionChat now has the same nil-phraser floor the other model callers have. The second defect filed here — a reply body of literally "{" — was closed by the errBrokenJSON path in V-397 and needs nothing further.
This commit is contained in:
@@ -38,6 +38,21 @@ func (h *reactiveHandler) actionFact(ctx context.Context, dec router.Decision) s
|
||||
q.Slots.Value = ""
|
||||
return h.actionQuery(ctx, q)
|
||||
}
|
||||
// A complaint is not a fact either (#481). "сеть какая-то медленная" and
|
||||
// "интернет не работает" were stored as `self` rows at confidence 1.00, and
|
||||
// recall reads a self row back later as if it were still true — the same
|
||||
// class of row that outranked live search in #470. The sentence describes a
|
||||
// moment, so she answers it and stores nothing. An explicit "запомни ..."
|
||||
// and anything about him are both left alone by the test.
|
||||
if router.IsTransientComplaint(dec.Utterance) {
|
||||
log.Printf("voice: fact write refused, utterance is a passing complaint: %q (key %q) — answering as chat",
|
||||
dec.Utterance, dec.Slots.Key)
|
||||
c := dec
|
||||
c.Intent = router.IntentChat
|
||||
c.Slots.Key, c.Slots.HasKey = "", false
|
||||
c.Slots.Value = ""
|
||||
return h.actionChat(ctx, c)
|
||||
}
|
||||
now := h.now()
|
||||
req := ipc.WriteFactReq{
|
||||
Ts: now,
|
||||
|
||||
Reference in New Issue
Block a user