Class: Google::Cloud::Ces::V1::Guardrail::CodeCallback

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/ces/v1/guardrail.rb

Overview

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

Instance Attribute Summary collapse

Instance Attribute Details

#after_agent_callback::Google::Cloud::Ces::V1::Callback

Returns 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::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.


316
317
318
319
# File 'proto_docs/google/cloud/ces/v1/guardrail.rb', line 316

class CodeCallback
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#after_model_callback::Google::Cloud::Ces::V1::Callback

Returns 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::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.


316
317
318
319
# File 'proto_docs/google/cloud/ces/v1/guardrail.rb', line 316

class CodeCallback
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#before_agent_callback::Google::Cloud::Ces::V1::Callback

Returns 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::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.


316
317
318
319
# File 'proto_docs/google/cloud/ces/v1/guardrail.rb', line 316

class CodeCallback
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#before_model_callback::Google::Cloud::Ces::V1::Callback

Returns 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::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.


316
317
318
319
# File 'proto_docs/google/cloud/ces/v1/guardrail.rb', line 316

class CodeCallback
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end