Skip to content

Fix/community integrations colang2 #1140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Pouyanpi
Copy link
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
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