Skip to content

GuardrailTopic

Structure Class

GuardrailTopic dataclass

Bases: _SerdeShape

Information about a topic guardrail.

Attributes

action instance-attribute
action: str

The action the guardrail should take when it intervenes on a topic.

detected class-attribute instance-attribute
detected: bool | None = ...

Indicates whether topic content that breaches the guardrail configuration is detected.

name instance-attribute
name: str

The name for the guardrail.

type instance-attribute
type: str

The type behavior that the guardrail should perform when the model detects the topic.