langchain_experimental.comprehend_moderation.base_moderation.BaseModeration

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

审查基类。

方法

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

moderate(prompt)

审查输入提示。

参数
  • client (Any) –

  • config (Optional[Any]) –

  • moderation_callback (Optional[Any]) –

  • unique_id (Optional[str]) –

  • run_manager (Optional[CallbackManagerForChainRun]) –

__init__(client: Any, config: Optional[Any] = None, moderation_callback: Optional[Any] = None, unique_id: Optional[str] = None, run_manager: Optional[CallbackManagerForChainRun] = None)[源代码]
参数
  • client (Any) –

  • config (Optional[Any]) –

  • moderation_callback (Optional[Any]) –

  • unique_id (Optional[str]) –

  • run_manager (Optional[CallbackManagerForChainRun]) –

moderate(prompt: Any) str[源代码]

审查输入提示。

参数

prompt (Any) –

返回类型

str