Rajan Sharma commited on
Commit
1b82460
·
verified ·
1 Parent(s): 1e3e62c

Update safety.py

Browse files
Files changed (1) hide show
  1. safety.py +10 -4
safety.py CHANGED
@@ -1,9 +1,15 @@
1
- \
2
- def safety_filter(text, mode="input"):
3
- # Placeholder safety filter (replace with real policy if needed).
 
 
 
 
4
  blocked = False
5
  reason = ""
6
  return text, blocked, reason
7
 
8
  def refusal_reply(reason: str):
9
- return "Sorry, I can't help with that request."
 
 
 
1
+ POLICY_NOTICE = (
2
+ "ClarityOps provides operational & executive decision support. "
3
+ "It is not a diagnostic tool. For clinical decisions, follow institutional protocols and escalate as required."
4
+ )
5
+
6
+ def safety_filter(text: str, mode: str = "input"):
7
+ # Add real safety stack here (prompt attack detection, prohibited intents, etc.)
8
  blocked = False
9
  reason = ""
10
  return text, blocked, reason
11
 
12
  def refusal_reply(reason: str):
13
+ if reason:
14
+ return f"Sorry, I can’t help with that. {POLICY_NOTICE}"
15
+ return f"Sorry, I can’t help with that. {POLICY_NOTICE}"