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.



3945
3946
3947
# File 'lib/google/apis/ces_v1/classes.rb', line 3945

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



3925
3926
3927
# File 'lib/google/apis/ces_v1/classes.rb', line 3925

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



3931
3932
3933
# File 'lib/google/apis/ces_v1/classes.rb', line 3931

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



3937
3938
3939
# File 'lib/google/apis/ces_v1/classes.rb', line 3937

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



3943
3944
3945
# File 'lib/google/apis/ces_v1/classes.rb', line 3943

def before_model_callback
  @before_model_callback
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3950
3951
3952
3953
3954
3955
# File 'lib/google/apis/ces_v1/classes.rb', line 3950

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