langchain_experimental.comprehend_moderation.pii.ComprehendPII

class langchain_experimental.comprehend_moderation.pii.ComprehendPII(client: Any, callback: Optional[Any] = None, unique_id: Optional[str] = None, chain_id: Optional[str] = None)[source]

Class to handle Personally Identifiable Information (PII) moderation.

Methods

__init__(client[, callback, unique_id, chain_id])

validate(prompt_value[, config])

Parameters
  • client (Any) –

  • callback (Optional[Any]) –

  • unique_id (Optional[str]) –

  • chain_id (Optional[str]) –

__init__(client: Any, callback: Optional[Any] = None, unique_id: Optional[str] = None, chain_id: Optional[str] = None) None[source]
Parameters
  • client (Any) –

  • callback (Optional[Any]) –

  • unique_id (Optional[str]) –

  • chain_id (Optional[str]) –

Return type

None

validate(prompt_value: str, config: Optional[Any] = None) str[source]
Parameters
  • prompt_value (str) –

  • config (Optional[Any]) –

Return type

str