BaseModerationConfig#

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

Bases: BaseModel

Base configuration settings for moderation.

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 filters: List[ModerationPiiConfig | ModerationToxicityConfig | ModerationPromptSafetyConfig] = [ModerationPiiConfig(threshold=0.5, labels=[], redact=False, mask_character='*'), ModerationToxicityConfig(threshold=0.5, labels=[]), ModerationPromptSafetyConfig(threshold=0.5)]#

Filters applied to the moderation chain, defaults to [ModerationPiiConfig(), ModerationToxicityConfig(), ModerationPromptSafetyConfig()]