atlasbot: refine insight tone and status
This commit is contained in:
parent
20364a262c
commit
18e543d95a
@ -16,7 +16,7 @@ spec:
|
||||
labels:
|
||||
app: atlasbot
|
||||
annotations:
|
||||
checksum/atlasbot-configmap: manual-atlasbot-67
|
||||
checksum/atlasbot-configmap: manual-atlasbot-68
|
||||
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"
|
||||
|
||||
@ -118,7 +118,7 @@ CONFIDENCE_RE = re.compile(r"confidence\s*:\s*(high|medium|low)\b", re.IGNORECAS
|
||||
OPERATION_HINTS = {
|
||||
"count": ("how many", "count", "number", "total"),
|
||||
"list": ("list", "which", "what are", "show", "names"),
|
||||
"top": ("top", "hottest", "highest", "most", "largest", "max", "maximum"),
|
||||
"top": ("top", "hottest", "highest", "most", "largest", "max", "maximum", "busiest", "busy"),
|
||||
"status": ("ready", "not ready", "unready", "down", "missing", "status"),
|
||||
}
|
||||
|
||||
@ -1414,6 +1414,11 @@ def structured_answer(
|
||||
names = [node["name"] for node in filtered]
|
||||
|
||||
if op == "status":
|
||||
if "missing" in q and ("ready" in q or "readiness" in q):
|
||||
return _format_confidence(
|
||||
"Not ready nodes: " + (", ".join(names) if names else "none") + ".",
|
||||
"high",
|
||||
)
|
||||
if "missing" in q and expected_workers:
|
||||
missing = sorted(set(expected_workers) - {n["name"] for n in inventory})
|
||||
return _format_confidence(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user