Gemini Enterprise for Customer Experience V1BETA API - Class Google::Cloud::Ces::V1beta::Guardrail::CodeCallback (v0.1.0)

Reference documentation and code samples for the Gemini Enterprise for Customer Experience V1BETA API class Google::Cloud::Ces::V1beta::Guardrail::CodeCallback.

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

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#after_agent_callback

def after_agent_callback() -> ::Google::Cloud::Ces::V1beta::Callback
Returns
  • (::Google::Cloud::Ces::V1beta::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.

#after_agent_callback=

def after_agent_callback=(value) -> ::Google::Cloud::Ces::V1beta::Callback
Parameter
  • value (::Google::Cloud::Ces::V1beta::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.
Returns
  • (::Google::Cloud::Ces::V1beta::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.

#after_model_callback

def after_model_callback() -> ::Google::Cloud::Ces::V1beta::Callback
Returns
  • (::Google::Cloud::Ces::V1beta::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.

#after_model_callback=

def after_model_callback=(value) -> ::Google::Cloud::Ces::V1beta::Callback
Parameter
  • value (::Google::Cloud::Ces::V1beta::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.
Returns
  • (::Google::Cloud::Ces::V1beta::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.

#before_agent_callback

def before_agent_callback() -> ::Google::Cloud::Ces::V1beta::Callback
Returns
  • (::Google::Cloud::Ces::V1beta::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.

#before_agent_callback=

def before_agent_callback=(value) -> ::Google::Cloud::Ces::V1beta::Callback
Parameter
  • value (::Google::Cloud::Ces::V1beta::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.
Returns
  • (::Google::Cloud::Ces::V1beta::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.

#before_model_callback

def before_model_callback() -> ::Google::Cloud::Ces::V1beta::Callback
Returns
  • (::Google::Cloud::Ces::V1beta::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.

#before_model_callback=

def before_model_callback=(value) -> ::Google::Cloud::Ces::V1beta::Callback
Parameter
  • value (::Google::Cloud::Ces::V1beta::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.
Returns
  • (::Google::Cloud::Ces::V1beta::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.