nemoguardrails.library.sensitive_data_detection.actions
nemoguardrails.library.sensitive_data_detection.actions
Module Contents
Functions
Data
API
Helper to compute the ad hoc recognizers for a config.
async
Checks whether the provided text contains any sensitive data.
Args source: The source for the text, i.e. “input”, “output”, “retrieval”. text: The text to check. config: The rails configuration object.
Returns RailOutcome.block() if sensitive data has been detected, RailOutcome.allow() otherwise.
async
Checks whether the provided text contains any sensitive data.
Args source: The source for the text, i.e. “input”, “output”, “retrieval”. text: The text to check. config: The rails configuration object.
Returns RailOutcome.transform() with the altered text if it changed, RailOutcome.allow() otherwise.