Skip to content

Fix/community integrations colang2 - #1140

Merged
Pouyanpi merged 4 commits into
developfrom
fix/community-integrations-colang2
May 14, 2025
Merged

Fix/community integrations colang2#1140
Pouyanpi merged 4 commits into
developfrom
fix/community-integrations-colang2

Conversation

@Pouyanpi

Copy link
Copy Markdown
Collaborator

Description

This pull request includes fixes to the PII detection and masking flows of PrivateAI, as well as fixes to the prompt security colang 2 flows.

PII Detection and Masking Updates:

  • Changed the is_system_action parameter for detect_pii and mask_pii actions to False, making them non-system actions. (nemoguardrails/library/privateai/actions.py, [1] [2]
  • Removed the @active directive from all PII-related flows, including detection and masking for input, output, and retrieval contexts. (nemoguardrails/library/privateai/flows.co, [1] [2] [3] [4] [5]

Prompt Security Fixes:

  • Replaced protect_text calls with ProtectTextAction in the protect prompt and protect response flows, and added support for configurable exceptions using enable_rails_exceptions. If enabled, exceptions are raised when prompts or responses are blocked; otherwise, the flow aborts with a generic message. (nemoguardrails/library/prompt_security/flows.co, nemoguardrails/library/prompt_security/flows.coL3-R26)
  • Updated subflows in flows.v1.co to include exception handling for blocked prompts and responses, aligning with the new configurable behavior. (nemoguardrails/library/prompt_security/flows.v1.co, [1] [2]

Set `is_system_action` to `False` for `detect_pii` and `mask_pii`
actions to align with updated requirements. Remove `@active`
decorators from flows in `flows.co` to streamline flow activation
logic.
@Pouyanpi
Pouyanpi force-pushed the fix/community-integrations-colang2 branch from f6eaa7d to b39350a Compare April 23, 2025 12:40
@Pouyanpi Pouyanpi self-assigned this Apr 23, 2025
@Pouyanpi Pouyanpi added the bug Something isn't working label Apr 23, 2025
@Pouyanpi Pouyanpi added this to the v0.14.0 milestone Apr 23, 2025
@Pouyanpi Pouyanpi added enhancement New feature or request refactoring and removed enhancement New feature or request refactoring labels May 1, 2025
@Pouyanpi
Pouyanpi marked this pull request as ready for review May 13, 2025 19:11
@Pouyanpi
Pouyanpi merged commit 36d625e into develop May 14, 2025
@Pouyanpi
Pouyanpi deleted the fix/community-integrations-colang2 branch May 14, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant