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.



3753
3754
3755
# File 'lib/google/apis/ces_v1/classes.rb', line 3753

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



3733
3734
3735
# File 'lib/google/apis/ces_v1/classes.rb', line 3733

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



3739
3740
3741
# File 'lib/google/apis/ces_v1/classes.rb', line 3739

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



3745
3746
3747
# File 'lib/google/apis/ces_v1/classes.rb', line 3745

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



3751
3752
3753
# File 'lib/google/apis/ces_v1/classes.rb', line 3751

def before_model_callback
  @before_model_callback
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3758
3759
3760
3761
3762
3763
# File 'lib/google/apis/ces_v1/classes.rb', line 3758

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