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.



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

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



3741
3742
3743
# File 'lib/google/apis/ces_v1/classes.rb', line 3741

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



3747
3748
3749
# File 'lib/google/apis/ces_v1/classes.rb', line 3747

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



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

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



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

def before_model_callback
  @before_model_callback
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3766
3767
3768
3769
3770
3771
# File 'lib/google/apis/ces_v1/classes.rb', line 3766

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