atlasbot: prefer hardware for general interest

This commit is contained in:
Brad Stein 2026-01-27 19:01:16 -03:00
parent 4bab34eae1
commit 243d3112ce
2 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,7 @@ spec:
labels: labels:
app: atlasbot app: atlasbot
annotations: annotations:
checksum/atlasbot-configmap: manual-atlasbot-61 checksum/atlasbot-configmap: manual-atlasbot-62
vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/role: "comms" vault.hashicorp.com/role: "comms"
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"

View File

@ -1701,6 +1701,8 @@ def _select_insight(
prefer_keys.extend(["hardware", "availability"]) prefer_keys.extend(["hardware", "availability"])
if any(word in q for word in ("coolest", "favorite", "favourite", "trivia", "fun")): if any(word in q for word in ("coolest", "favorite", "favourite", "trivia", "fun")):
prefer_keys.extend(["hardware", "cpu", "ram"]) prefer_keys.extend(["hardware", "cpu", "ram"])
if "interesting" in q and "most interesting" not in q:
prefer_keys.extend(["hardware", "postgres", "cpu", "ram"])
avoid_used = any(word in q for word in ("another", "else", "different", "other")) or "most interesting" in q avoid_used = any(word in q for word in ("another", "else", "different", "other")) or "most interesting" in q
if any(word in q for word in ("another", "else", "different", "other")) and len(candidates) > 1: if any(word in q for word in ("another", "else", "different", "other")) and len(candidates) > 1:
for candidate in candidates: for candidate in candidates: