atlasbot: answer hardware mix with snapshot
This commit is contained in:
parent
a166a94003
commit
f5ea0277f6
@ -661,6 +661,16 @@ class AnswerEngine:
|
||||
reply = f"From the latest snapshot: {target}={count} ({nodes})."
|
||||
else:
|
||||
reply = f"From the latest snapshot: {target}={count}."
|
||||
if any(tok in lowered_q for tok in ("mix", "breakdown", "composition", "hardware mix", "hardware stack")) and any(
|
||||
tok in lowered_q for tok in ("jetson", "rpi4", "rpi5", "amd64", "arm64", "hardware")
|
||||
):
|
||||
hw_line = next((line for line in summary_lines if line.startswith("hardware:")), None)
|
||||
hw_nodes_line = next((line for line in summary_lines if line.startswith("hardware_nodes:")), None)
|
||||
if hw_line:
|
||||
if hw_nodes_line:
|
||||
reply = f"From the latest snapshot: {hw_line}; {hw_nodes_line}."
|
||||
else:
|
||||
reply = f"From the latest snapshot: {hw_line}."
|
||||
if _has_token(lowered_q, "io") and ("node" in lowered_q or "nodes" in lowered_q):
|
||||
io_facts = _extract_hottest_facts(summary_lines, lowered_q)
|
||||
io_line = next((fact for fact in io_facts if fact.startswith("hottest_io_node")), None)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user