ModerationPiiConfig#

class langchain_experimental.comprehend_moderation.base_moderation_config.ModerationPiiConfig[source]#

Bases: BaseModel

Configuration for PII moderation filter.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param labels: List[str] = []#

List of PII Universal Labels. Defaults to list[]

param mask_character: str = '*'#

Redaction mask character in case redact=True, defaults to asterisk (*)

param redact: bool = False#

Whether to perform redaction of detected PII entities

param threshold: float = 0.5#

Threshold for PII confidence score, defaults to 0.5 i.e. 50%