BaseModeration#

class langchain_experimental.comprehend_moderation.base_moderation.BaseModeration(client: Any, config: Any | None = None, moderation_callback: Any | None = None, unique_id: str | None = None, run_manager: CallbackManagerForChainRun | None = None)[source]#

Base class for moderation.

Methods

__init__(client[,Β config,Β ...])

moderate(prompt)

Moderate the input prompt.

Parameters:
  • client (Any) –

  • config (Any | None) –

  • moderation_callback (Any | None) –

  • unique_id (str | None) –

  • run_manager (CallbackManagerForChainRun | None) –

__init__(client: Any, config: Any | None = None, moderation_callback: Any | None = None, unique_id: str | None = None, run_manager: CallbackManagerForChainRun | None = None)[source]#
Parameters:
  • client (Any) –

  • config (Any | None) –

  • moderation_callback (Any | None) –

  • unique_id (str | None) –

  • run_manager (CallbackManagerForChainRun | None) –

moderate(prompt: Any) β†’ str[source]#

Moderate the input prompt.

Parameters:

prompt (Any) –

Return type:

str