Class GuardrailLlmPolicy
Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.
Implements
Inherited Members
Namespace: Google.Apis.CustomerEngagementSuite.v1.Data
Assembly: Google.Apis.CustomerEngagementSuite.v1.dll
Syntax
public class GuardrailLlmPolicy : IDirectResponseSchema
Properties
AllowShortUtterance
Optional. By default, the LLM policy check is bypassed for short utterances. Enabling this setting applies the policy check to all utterances, including those that would normally be skipped.
Declaration
[JsonProperty("allowShortUtterance")]
public virtual bool? AllowShortUtterance { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
FailOpen
Optional. If an error occurs during the policy check, fail open and do not trigger the guardrail.
Declaration
[JsonProperty("failOpen")]
public virtual bool? FailOpen { get; set; }
Property Value
| Type | Description |
|---|---|
| bool? |
MaxConversationMessages
Optional. When checking this policy, consider the last 'n' messages in the conversation. When not set a default value of 10 will be used.
Declaration
[JsonProperty("maxConversationMessages")]
public virtual int? MaxConversationMessages { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
ModelSettings
Optional. Model settings.
Declaration
[JsonProperty("modelSettings")]
public virtual ModelSettings ModelSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| ModelSettings |
PolicyScope
Required. Defines when to apply the policy check during the conversation. If set to
POLICY_SCOPE_UNSPECIFIED, the policy will be applied to the user input. When applying the policy to the
agent response, additional latency will be introduced before the agent can respond.
Declaration
[JsonProperty("policyScope")]
public virtual string PolicyScope { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Prompt
Required. Policy prompt.
Declaration
[JsonProperty("prompt")]
public virtual string Prompt { get; set; }
Property Value
| Type | Description |
|---|---|
| string |