the query source that claimed a turn is readable on /chat (V-539)
V-539 said SearXNG claims every world question, including invented terms, so Kiwix is never reached. Measured today against the configured instance: seven of eight invented Russian questions now return zero results, and Response.Empty() already passes those to the ZIM. The premise moved with the upstream engine set in three days. The three quality signals the task named were recorded per query and none separate the sets. Token overlap is zero for the one bad claim and also zero for "столица Франции", whose answer is Париж. Empty snippets never fire, because ParseResponse already drops a hit with no text. SearXNG returned no corrections or suggestions even for the query it silently respelled. So no threshold is built: it would cost a real answer to save one invented word. What ships is the second half. The claiming query source crosses the IPC seam on ipc.ChatReply.Source and renders as a badge beside the reply on /chat. It rides the context rather than a return value, because handleText answers every reach through one string and the mic, telegram and the web all share it. Chat now returns ChatReply instead of a bare string. Full -race suite green.
This commit is contained in:
+17
-4
@@ -214,9 +214,9 @@ type SeedEventReq struct {
|
||||
// failure. Proposed is true only when this seed completed a pattern; the first
|
||||
// three seeds of a run return false with no routine.
|
||||
type SeedEventResp struct {
|
||||
FactID int64 `json:"fact_id"`
|
||||
EventID int64 `json:"event_id,omitempty"`
|
||||
Extracted bool `json:"extracted"`
|
||||
FactID int64 `json:"fact_id"`
|
||||
EventID int64 `json:"event_id,omitempty"`
|
||||
Extracted bool `json:"extracted"`
|
||||
Action string `json:"action,omitempty"`
|
||||
Object string `json:"object,omitempty"`
|
||||
Proposed bool `json:"proposed"`
|
||||
@@ -664,7 +664,20 @@ type chatReq struct {
|
||||
Conversation string `json:"conversation,omitempty"`
|
||||
}
|
||||
type chatResp struct {
|
||||
Reply string `json:"reply"`
|
||||
Reply string `json:"reply"`
|
||||
Source string `json:"source,omitempty"`
|
||||
}
|
||||
|
||||
// ChatReply — one text turn's answer plus which query source claimed it.
|
||||
//
|
||||
// Source is diagnostic and is empty unless the turn was a question a source
|
||||
// claimed: a fact write, an act or a chat turn names none. It exists because
|
||||
// the claiming source was readable only in the daemon log, so a QA step could
|
||||
// not tell a wrong answer from a wrongly ordered chain (V-539). It is not
|
||||
// authorization and nothing routes on it.
|
||||
type ChatReply struct {
|
||||
Reply string
|
||||
Source string
|
||||
}
|
||||
|
||||
type proposeToolReq struct {
|
||||
|
||||
Reference in New Issue
Block a user