Fix/community integrations colang2 #1140
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
is_system_action
parameter fordetect_pii
andmask_pii
actions toFalse
, making them non-system actions. (nemoguardrails/library/privateai/actions.py
, [1] [2]@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:
protect_text
calls withProtectTextAction
in theprotect prompt
andprotect response
flows, and added support for configurable exceptions usingenable_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)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]