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][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

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()]