Skip to content

Commit 6de824e

Browse files
committed
fix: Add explicit global declarations in sensitive_data_detection Colang v2 flows
1 parent 0d6fa42 commit 6de824e

File tree

1 file changed

+4
-1
lines changed
  • nemoguardrails/library/sensitive_data_detection

1 file changed

+4
-1
lines changed

nemoguardrails/library/sensitive_data_detection/flows.co

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ flow detect sensitive data on input
1111

1212
flow mask sensitive data on input
1313
"""Mask any sensitive data found in the user input."""
14+
global $user_message
1415
$user_message = await MaskSensitiveDataAction(source="input", text=$user_message)
1516

1617

@@ -28,10 +29,11 @@ flow detect sensitive data on output
2829

2930
flow mask sensitive data on output
3031
"""Mask any sensitive data found in the bot output."""
32+
global $bot_message
3133
$bot_message = await MaskSensitiveDataAction(source="output", text=$bot_message)
3234

3335

34-
# RETRIVAL RAILS
36+
# RETRIEVAL RAILS
3537

3638

3739
flow detect sensitive data on retrieval
@@ -45,4 +47,5 @@ flow detect sensitive data on retrieval
4547

4648
flow mask sensitive data on retrieval
4749
"""Mask any sensitive data found in the relevant chunks from the knowledge base."""
50+
global $relevant_chunks
4851
$relevant_chunks = await MaskSensitiveDataAction(source="retrieval", text=$relevant_chunks)

0 commit comments

Comments
 (0)