Guardrail class

Guardrail contains a list of checks and balances to keep the agents safe and secure.

Constructors

Guardrail({TriggerAction? action, GuardrailCodeCallback? codeCallback, GuardrailContentFilter? contentFilter, String? createTime, String? description, String? displayName, bool? enabled, String? etag, GuardrailLlmPolicy? llmPolicy, GuardrailLlmPromptSecurity? llmPromptSecurity, GuardrailModelSafety? modelSafety, String? name, String? updateTime})
Guardrail.fromJson(Map json_)

Properties

action TriggerAction?
Action to take when the guardrail is triggered.
getter/setter pair
codeCallback GuardrailCodeCallback?
Guardrail that potentially blocks the conversation based on the result of the callback execution.
getter/setter pair
contentFilter GuardrailContentFilter?
Guardrail that bans certain content from being used in the conversation.
getter/setter pair
createTime String?
Timestamp when the guardrail was created.
getter/setter pair
description String?
Description of the guardrail.
getter/setter pair
displayName String?
Display name of the guardrail.
getter/setter pair
enabled bool?
Whether the guardrail is enabled.
getter/setter pair
etag String?
Etag used to ensure the object hasn't changed during a read-modify-write operation.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
llmPolicy GuardrailLlmPolicy?
Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.
getter/setter pair
llmPromptSecurity GuardrailLlmPromptSecurity?
Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.
getter/setter pair
modelSafety GuardrailModelSafety?
Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.
getter/setter pair
name String?
Identifier.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updateTime String?
Timestamp when the guardrail was last updated.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited