GuardChain#

class datarobotx.llm.GuardChain(**kwargs)#

Apply monitoring and guardrails to a chain with DataRobot MLOps.

Only supports inner chains with exactly one output key

Automatically applies suitable input and output parsers for langchain to your MonitoringConfig

Parameters:
  • inner_chain (chain) – The chain being wrapped with monitoring and optional guardrails

  • monitor (MonitoringConfig) – Configuration for how to monitor the inner chain

  • guardrails (list of GuardrailConfig, optional) – Configuration for how to use guardrails with the inner chain

Chain inputs and outputs:

input_keys

Chain inputs.

output_keys

Chain outputs.

property input_keys: List[str]#

Chain inputs.

Inherits inputs from inner_chain

property output_keys: List[str]#

Chain outputs.

Inherits outputs from inner_chain