Toggle Menu
Prev Up Next

# `langchain_experimental.comprehend_moderation.base_moderation_exceptions`.ModerationPiiError

class langchain_experimental.comprehend_moderation.base_moderation_exceptions.ModerationPiiError(message: str = 'The prompt contains PII entities and cannot be processed')

  Exception raised if PII entities are detected.

  Parameters

    message (str) –

  message -- explanation of the error

# Examples using ModerationPiiError

- Define callback handlers by subclassing BaseModerationCallbackHandler