mirror of
https://github.com/hoshikawa2/nemo_guardrails_oci_generative_ai.git
synced 2026-07-10 00:14:20 +00:00
first commit
This commit is contained in:
10
files/configs/default/rails/input.co
Normal file
10
files/configs/default/rails/input.co
Normal file
@@ -0,0 +1,10 @@
|
||||
define bot refuse to respond
|
||||
"I'm sorry, I can't respond to that."
|
||||
|
||||
define subflow keyword check input
|
||||
"""Check if the user input contains any forbidden keywords."""
|
||||
$result = execute detect_keywords(source="input", text=$user_message)
|
||||
|
||||
if $result["is_match"]
|
||||
bot refuse to respond
|
||||
stop
|
||||
Reference in New Issue
Block a user