atlasbot: expand hardware and entity detection
This commit is contained in:
parent
9bf822ec36
commit
12fa7d02aa
@ -16,7 +16,7 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: atlasbot
|
app: atlasbot
|
||||||
annotations:
|
annotations:
|
||||||
checksum/atlasbot-configmap: manual-atlasbot-64
|
checksum/atlasbot-configmap: manual-atlasbot-65
|
||||||
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"
|
||||||
|
|||||||
@ -197,6 +197,8 @@ _INSIGHT_HINT_WORDS = {
|
|||||||
"favorite",
|
"favorite",
|
||||||
"favourite",
|
"favourite",
|
||||||
"trivia",
|
"trivia",
|
||||||
|
"stand out",
|
||||||
|
"stands out",
|
||||||
}
|
}
|
||||||
|
|
||||||
_OVERVIEW_HINT_WORDS = {
|
_OVERVIEW_HINT_WORDS = {
|
||||||
@ -213,8 +215,8 @@ _OLLAMA_LOCK = threading.Lock()
|
|||||||
HARDWARE_HINTS = {
|
HARDWARE_HINTS = {
|
||||||
"amd64": ("amd64", "x86", "x86_64", "x86-64"),
|
"amd64": ("amd64", "x86", "x86_64", "x86-64"),
|
||||||
"jetson": ("jetson",),
|
"jetson": ("jetson",),
|
||||||
"rpi4": ("rpi4",),
|
"rpi4": ("rpi4", "raspberry pi 4", "raspberry pi-4"),
|
||||||
"rpi5": ("rpi5",),
|
"rpi5": ("rpi5", "raspberry pi 5", "raspberry pi-5"),
|
||||||
"rpi": ("rpi", "raspberry"),
|
"rpi": ("rpi", "raspberry"),
|
||||||
"arm64": ("arm64", "aarch64"),
|
"arm64": ("arm64", "aarch64"),
|
||||||
}
|
}
|
||||||
@ -559,7 +561,16 @@ def _detect_role_filters(q: str) -> set[str]:
|
|||||||
return roles
|
return roles
|
||||||
|
|
||||||
def _detect_entity(q: str) -> str | None:
|
def _detect_entity(q: str) -> str | None:
|
||||||
if "node" in q or "nodes" in q or "worker" in q or "hardware" in q or "architecture" in q or TITAN_NODE_RE.search(q):
|
if (
|
||||||
|
"node" in q
|
||||||
|
or "nodes" in q
|
||||||
|
or "worker" in q
|
||||||
|
or "hardware" in q
|
||||||
|
or "architecture" in q
|
||||||
|
or "machine" in q
|
||||||
|
or "machines" in q
|
||||||
|
or TITAN_NODE_RE.search(q)
|
||||||
|
):
|
||||||
return "node"
|
return "node"
|
||||||
if "pod" in q or "pods" in q:
|
if "pod" in q or "pods" in q:
|
||||||
return "pod"
|
return "pod"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user