diff --git a/services/comms/atlasbot-deployment.yaml b/services/comms/atlasbot-deployment.yaml index cbc79e5..ef6b88b 100644 --- a/services/comms/atlasbot-deployment.yaml +++ b/services/comms/atlasbot-deployment.yaml @@ -16,7 +16,7 @@ spec: labels: app: atlasbot annotations: - checksum/atlasbot-configmap: manual-atlasbot-60 + checksum/atlasbot-configmap: manual-atlasbot-61 vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/role: "comms" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" diff --git a/services/comms/scripts/atlasbot/bot.py b/services/comms/scripts/atlasbot/bot.py index 613b0c6..9434e91 100644 --- a/services/comms/scripts/atlasbot/bot.py +++ b/services/comms/scripts/atlasbot/bot.py @@ -1701,6 +1701,7 @@ def _select_insight( prefer_keys.extend(["hardware", "availability"]) if any(word in q for word in ("coolest", "favorite", "favourite", "trivia", "fun")): prefer_keys.extend(["hardware", "cpu", "ram"]) + 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: for candidate in candidates: if candidate[0] not in used: @@ -1709,13 +1710,13 @@ def _select_insight( if prefer_keys: for prefer in prefer_keys: for key, text, conf in candidates: - if key == prefer and key not in used: + if key == prefer and (not avoid_used or key not in used): return key, text, conf for prefer in prefer_keys: for key, text, conf in candidates: if key == prefer: return key, text, conf - if used: + if used and avoid_used: for candidate in candidates: if candidate[0] not in used: return candidate