MCPcopy Index your code
hub / github.com/geekcomputers/Python / is_dangerous_request

Function is_dangerous_request

JARVIS/safety.py:47–49  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

45
46
47def is_dangerous_request(text):
48 words = set(re.findall(r"[a-z0-9]+", normalize_text(text)))
49 return bool(words & DANGEROUS_WORDS)
50

Callers 3

run_actionFunction · 0.85
rule_based_actionFunction · 0.85
handle_user_textFunction · 0.85

Calls 1

normalize_textFunction · 0.85

Tested by

no test coverage detected