File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
examples/configs/sensitive_data_detection_v2 Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ colang_version : " 2.x"
2
+
3
+ models :
4
+ - type : main
5
+ engine : openai
6
+ model : gpt-4o-mini
7
+
8
+ rails :
9
+ config :
10
+ sensitive_data_detection :
11
+ input :
12
+ score_threshold : 0.4
13
+ entities :
14
+ - PERSON
15
+ - EMAIL_ADDRESS
16
+ - PHONE_NUMBER
17
+ - CREDIT_CARD
18
+ - US_SSN
19
+ - LOCATION
20
+
21
+ output :
22
+ score_threshold : 0.4
23
+ entities :
24
+ - PERSON
25
+ - EMAIL_ADDRESS
26
+ - PHONE_NUMBER
27
+ - CREDIT_CARD
28
+ - US_SSN
29
+ - LOCATION
Original file line number Diff line number Diff line change
1
+ import guardrails
2
+ import nemoguardrails.library.sensitive_data_detection
3
+
4
+ flow input rails $input_text
5
+ """Check user utterances before they get further processed."""
6
+ await mask sensitive data on input
7
+
8
+ flow output rails $output_text
9
+ """Check response before sending it to user."""
10
+ await mask sensitive data on output
Original file line number Diff line number Diff line change
1
+ import core
2
+ import llm
3
+
4
+ flow main
5
+ activate llm continuation
You can’t perform that action at this time.
0 commit comments