public sealed class Guardrail.Types.CodeCallback : IMessage<Guardrail.Types.CodeCallback>, IEquatable<Guardrail.Types.CodeCallback>, IDeepCloneable<Guardrail.Types.CodeCallback>, IBufferMessage, IMessageReference documentation and code samples for the Gemini Enterprise for Customer Experience v1 API class Guardrail.Types.CodeCallback.
Guardrail that blocks the conversation based on the code callbacks provided.
Implements
IMessageGuardrailTypesCodeCallback, IEquatableGuardrailTypesCodeCallback, IDeepCloneableGuardrailTypesCodeCallback, IBufferMessage, IMessageNamespace
Google.Cloud.Ces.V1Assembly
Google.Cloud.Ces.V1.dll
Constructors
CodeCallback()
public CodeCallback()CodeCallback(CodeCallback)
public CodeCallback(Guardrail.Types.CodeCallback other)| Parameter | |
|---|---|
| Name | Description |
other |
GuardrailTypesCodeCallback |
Properties
AfterAgentCallback
public Callback AfterAgentCallback { get; set; }Optional. The callback to execute after the agent is called. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:
- 'decision': Either 'OK' or 'TRIGGER'.
- 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.
| Property Value | |
|---|---|
| Type | Description |
Callback |
|
AfterModelCallback
public Callback AfterModelCallback { get; set; }Optional. The callback to execute after the model is called. If there are multiple calls to the model, the callback will be executed multiple times. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:
- 'decision': Either 'OK' or 'TRIGGER'.
- 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.
| Property Value | |
|---|---|
| Type | Description |
Callback |
|
BeforeAgentCallback
public Callback BeforeAgentCallback { get; set; }Optional. The callback to execute before the agent is called. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:
- 'decision': Either 'OK' or 'TRIGGER'.
- 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.
| Property Value | |
|---|---|
| Type | Description |
Callback |
|
BeforeModelCallback
public Callback BeforeModelCallback { get; set; }Optional. The callback to execute before the model is called. If there are multiple calls to the model, the callback will be executed multiple times. Each callback function is expected to return a structure (e.g., a dict or object) containing at least:
- 'decision': Either 'OK' or 'TRIGGER'.
- 'reason': A string explaining the decision. A 'TRIGGER' decision may halt further processing.
| Property Value | |
|---|---|
| Type | Description |
Callback |
|