Google Cloud Ces V1 Client - Class CodeCallback (0.1.0)

Reference documentation and code samples for the Google Cloud Ces V1 Client class CodeCallback.

Guardrail that blocks the conversation based on the code callbacks provided.

Generated from protobuf message google.cloud.ces.v1.Guardrail.CodeCallback

Namespace

Google \ Cloud \ Ces \ V1 \ Guardrail

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ before_agent_callback
Google\Cloud\Ces\V1\Callback

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.

↳ after_agent_callback
Google\Cloud\Ces\V1\Callback

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.

↳ before_model_callback
Google\Cloud\Ces\V1\Callback

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.

↳ after_model_callback
Google\Cloud\Ces\V1\Callback

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.

getBeforeAgentCallback

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.
Returns
Type
Description

hasBeforeAgentCallback

clearBeforeAgentCallback

setBeforeAgentCallback

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.
Parameter
Name
Description
Returns
Type
Description
$this

getAfterAgentCallback

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.
Returns
Type
Description

hasAfterAgentCallback

clearAfterAgentCallback

setAfterAgentCallback

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.
Parameter
Name
Description
Returns
Type
Description
$this

getBeforeModelCallback

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.
Returns
Type
Description

hasBeforeModelCallback

clearBeforeModelCallback

setBeforeModelCallback

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.
Parameter
Name
Description
Returns
Type
Description
$this

getAfterModelCallback

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.
Returns
Type
Description

hasAfterModelCallback

clearAfterModelCallback

setAfterModelCallback

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.
Parameter
Name
Description
Returns
Type
Description
$this
Create a Mobile Website
View Site in Mobile | Classic
Share by: