public sealed class Guardrail : IMessage<Guardrail>, IEquatable<Guardrail>, IDeepCloneable<Guardrail>, IBufferMessage, IMessageReference documentation and code samples for the Gemini Enterprise for Customer Experience v1 API class Guardrail.
Guardrail contains a list of checks and balances to keep the agents safe and secure.
Implements
IMessageGuardrail, IEquatableGuardrail, IDeepCloneableGuardrail, IBufferMessage, IMessageNamespace
Google.Cloud.Ces.V1Assembly
Google.Cloud.Ces.V1.dll
Constructors
Guardrail()
public Guardrail()Guardrail(Guardrail)
public Guardrail(Guardrail other)| Parameter | |
|---|---|
| Name | Description |
other |
Guardrail |
Properties
Action
public TriggerAction Action { get; set; }Optional. Action to take when the guardrail is triggered.
| Property Value | |
|---|---|
| Type | Description |
TriggerAction |
|
CodeCallback
public Guardrail.Types.CodeCallback CodeCallback { get; set; }Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.
| Property Value | |
|---|---|
| Type | Description |
GuardrailTypesCodeCallback |
|
ContentFilter
public Guardrail.Types.ContentFilter ContentFilter { get; set; }Optional. Guardrail that bans certain content from being used in the conversation.
| Property Value | |
|---|---|
| Type | Description |
GuardrailTypesContentFilter |
|
CreateTime
public Timestamp CreateTime { get; set; }Output only. Timestamp when the guardrail was created.
| Property Value | |
|---|---|
| Type | Description |
Timestamp |
|
Description
public string Description { get; set; }Optional. Description of the guardrail.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DisplayName
public string DisplayName { get; set; }Required. Display name of the guardrail.
| Property Value | |
|---|---|
| Type | Description |
string |
|
Enabled
public bool Enabled { get; set; }Optional. Whether the guardrail is enabled.
| Property Value | |
|---|---|
| Type | Description |
bool |
|
Etag
public string Etag { get; set; }Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
| Property Value | |
|---|---|
| Type | Description |
string |
|
GuardrailName
public GuardrailName GuardrailName { get; set; }GuardrailName-typed view over the Name resource name property.
| Property Value | |
|---|---|
| Type | Description |
GuardrailName |
|
GuardrailTypeCase
public Guardrail.GuardrailTypeOneofCase GuardrailTypeCase { get; }| Property Value | |
|---|---|
| Type | Description |
GuardrailGuardrailTypeOneofCase |
|
LlmPolicy
public Guardrail.Types.LlmPolicy LlmPolicy { get; set; }Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.
| Property Value | |
|---|---|
| Type | Description |
GuardrailTypesLlmPolicy |
|
LlmPromptSecurity
public Guardrail.Types.LlmPromptSecurity LlmPromptSecurity { get; set; }Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.
| Property Value | |
|---|---|
| Type | Description |
GuardrailTypesLlmPromptSecurity |
|
ModelSafety
public Guardrail.Types.ModelSafety ModelSafety { get; set; }Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.
| Property Value | |
|---|---|
| Type | Description |
GuardrailTypesModelSafety |
|
Name
public string Name { get; set; }Identifier. The unique identifier of the guardrail.
Format:
projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}
| Property Value | |
|---|---|
| Type | Description |
string |
|
UpdateTime
public Timestamp UpdateTime { get; set; }Output only. Timestamp when the guardrail was last updated.
| Property Value | |
|---|---|
| Type | Description |
Timestamp |
|