GuardrailTopic¶
Structure Class¶
GuardrailTopic
dataclass
¶
Information about a topic guardrail.
Attributes¶
action
instance-attribute
¶
action: GuardrailTopicPolicyAction
The action the guardrail should take when it intervenes on a topic.
detected
class-attribute
instance-attribute
¶
detected: bool | None = None
Indicates whether topic content that breaches the guardrail configuration is detected.
type
instance-attribute
¶
type: GuardrailTopicType
The type behavior that the guardrail should perform when the model detects the topic.