langchain_experimental.comprehend_moderation.base_moderation_config.BaseModerationConfig¶
class langchain_experimental.comprehend_moderation.base_moderation_config.BaseModerationConfig[source]¶
Bases: BaseModel
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[Union[langchain_experimental.comprehend_moderation.base_moderation_config.ModerationPiiConfig, langchain_experimental.comprehend_moderation.base_moderation_config.ModerationToxicityConfig, langchain_experimental.comprehend_moderation.base_moderation_config.ModerationIntentConfig]] = [ModerationPiiConfig(threshold=0.5, labels=[], redact=False, mask_character='*'), ModerationToxicityConfig(threshold=0.5, labels=[]), ModerationIntentConfig(threshold=0.5)]¶
Filters applied to the moderation chain, defaults to
[ModerationPiiConfig(), ModerationToxicityConfig(),
ModerationIntentConfig()]
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶
Duplicate a model, optionally choose which fields to include, exclude and change.
Parameters