Wire voice-tapped facts into entity resolution; fix phraser model config
WriteFactReq gains an optional Subject field (empty = old behavior, no CoreAPI signature change) and the IntentFact handler now passes the fact's key as its resolution subject, so voice-tapped facts flow into the Vikunja #279 enrichment queue automatically. Also: deploy/mavend.json's phraser was pointed at a 4B model with n_gpu_layers=99, which OOM'd under memory pressure and left a zombie llama-server child. Swapped to the 2B Qwen model matching the intended resident-model size, keeping GPU offload. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ghELqYhZNLub2TXGMazqA
This commit is contained in:
@@ -84,6 +84,13 @@ type WriteFactReq struct {
|
||||
Source string `json:"source"`
|
||||
Confidence float64 `json:"confidence"`
|
||||
VoidsID *int64 `json:"voids_id,omitempty"`
|
||||
|
||||
// Subject — free-text "who/what this fact is about" (e.g. "the espresso
|
||||
// machine", "Kate"). Empty (the default, so old callers are unaffected)
|
||||
// means the fact isn't about a resolvable entity. When set, the fact
|
||||
// enrichment worker (cmd/mavend/factenrichment.go) later resolves it
|
||||
// against Nexus into an entity_id — see Vikunja #279.
|
||||
Subject string `json:"subject,omitempty"`
|
||||
}
|
||||
|
||||
// idReq — methods keyed by a single id.
|
||||
|
||||
@@ -36,7 +36,7 @@ func (a *storeAPI) WriteFact(ctx context.Context, req WriteFactReq) (int64, erro
|
||||
if req.VoidsID != nil {
|
||||
voids = sql.NullInt64{Int64: *req.VoidsID, Valid: true}
|
||||
}
|
||||
id, err := a.s.WriteFact(ctx, req.Ts, store.FactKind(req.Kind), req.Key, req.Value, req.Source, req.Confidence, voids)
|
||||
id, err := a.s.WriteFactAboutSubject(ctx, req.Ts, store.FactKind(req.Kind), req.Key, req.Subject, req.Value, req.Source, req.Confidence, voids)
|
||||
return id, mapErr(err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user