Class: Google::Apis::CesV1::GuardrailCodeCallback

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GuardrailCodeCallback

Returns a new instance of GuardrailCodeCallback.



3882
3883
3884
# File 'lib/google/apis/ces_v1/classes.rb', line 3882

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#after_agent_callbackGoogle::Apis::CesV1::Callback

A callback defines the custom logic to be executed at various stages of agent interaction. Corresponds to the JSON property afterAgentCallback



3862
3863
3864
# File 'lib/google/apis/ces_v1/classes.rb', line 3862

def after_agent_callback
  @after_agent_callback
end

#after_model_callbackGoogle::Apis::CesV1::Callback

A callback defines the custom logic to be executed at various stages of agent interaction. Corresponds to the JSON property afterModelCallback



3868
3869
3870
# File 'lib/google/apis/ces_v1/classes.rb', line 3868

def after_model_callback
  @after_model_callback
end

#before_agent_callbackGoogle::Apis::CesV1::Callback

A callback defines the custom logic to be executed at various stages of agent interaction. Corresponds to the JSON property beforeAgentCallback



3874
3875
3876
# File 'lib/google/apis/ces_v1/classes.rb', line 3874

def before_agent_callback
  @before_agent_callback
end

#before_model_callbackGoogle::Apis::CesV1::Callback

A callback defines the custom logic to be executed at various stages of agent interaction. Corresponds to the JSON property beforeModelCallback



3880
3881
3882
# File 'lib/google/apis/ces_v1/classes.rb', line 3880

def before_model_callback
  @before_model_callback
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3887
3888
3889
3890
3891
3892
# File 'lib/google/apis/ces_v1/classes.rb', line 3887

def update!(**args)
  @after_agent_callback = args[:after_agent_callback] if args.key?(:after_agent_callback)
  @after_model_callback = args[:after_model_callback] if args.key?(:after_model_callback)
  @before_agent_callback = args[:before_agent_callback] if args.key?(:before_agent_callback)
  @before_model_callback = args[:before_model_callback] if args.key?(:before_model_callback)
end