LordXido commited on
Commit
fbc3f80
·
verified ·
1 Parent(s): 7475ef6

Create constraints.py

Browse files
Files changed (1) hide show
  1. constraints.py +10 -0
constraints.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # constraints.py
2
+
3
+ FORBIDDEN = ["shutdown", "format", "delete all"]
4
+
5
+ def validate_intent(intent: str) -> tuple[bool, str]:
6
+ text = intent.lower()
7
+ for word in FORBIDDEN:
8
+ if word in text:
9
+ return False, f"Forbidden keyword detected: {word}"
10
+ return True, "OK"