GuardPipelineResult

Result of running a message through the full guard pipeline.

Usage

Source

GuardPipelineResult(
    text,
    blocked=False,
    block_reason=None,
    activations=list(),
)

Parameter Attributes

text: Optional[str]
blocked: bool = False
block_reason: Optional[str] = None
activations: list[GuardActivation] = list()

Attributes

text: Optional[str]

The final message text (original, rewritten, or None if blocked).

blocked: bool

Whether the message was blocked by any guard.

block_reason: Optional[str]

Reason for blocking (if blocked).

activations: list[GuardActivation]
Log of all guard activations in order.