Class: Google::Apis::CesV1::Callback
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::Callback
- 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
A callback defines the custom logic to be executed at various stages of agent interaction.
Instance Attribute Summary collapse
-
#description ⇒ String
Optional.
-
#disabled ⇒ Boolean
(also: #disabled?)
Optional.
-
#proactive_execution_enabled ⇒ Boolean
(also: #proactive_execution_enabled?)
Optional.
-
#python_code ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Callback
constructor
A new instance of Callback.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Callback
Returns a new instance of Callback.
1146 1147 1148 |
# File 'lib/google/apis/ces_v1/classes.rb', line 1146 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
Optional. Human-readable description of the callback.
Corresponds to the JSON property description
1121 1122 1123 |
# File 'lib/google/apis/ces_v1/classes.rb', line 1121 def description @description end |
#disabled ⇒ Boolean Also known as: disabled?
Optional. Whether the callback is disabled. Disabled callbacks are ignored by
the agent.
Corresponds to the JSON property disabled
1127 1128 1129 |
# File 'lib/google/apis/ces_v1/classes.rb', line 1127 def disabled @disabled end |
#proactive_execution_enabled ⇒ Boolean Also known as: proactive_execution_enabled?
Optional. If enabled, the callback will also be executed on intermediate model
outputs. This setting only affects after model callback. *ENABLE WITH CAUTION
*. Typically after model callback only needs to be executed after receiving
all model responses. Enabling proactive execution may have negative
implication on the execution cost and latency, and should only be enabled in
rare situations.
Corresponds to the JSON property proactiveExecutionEnabled
1138 1139 1140 |
# File 'lib/google/apis/ces_v1/classes.rb', line 1138 def proactive_execution_enabled @proactive_execution_enabled end |
#python_code ⇒ String
Required. The python code to execute for the callback.
Corresponds to the JSON property pythonCode
1144 1145 1146 |
# File 'lib/google/apis/ces_v1/classes.rb', line 1144 def python_code @python_code end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1151 1152 1153 1154 1155 1156 |
# File 'lib/google/apis/ces_v1/classes.rb', line 1151 def update!(**args) @description = args[:description] if args.key?(:description) @disabled = args[:disabled] if args.key?(:disabled) @proactive_execution_enabled = args[:proactive_execution_enabled] if args.key?(:proactive_execution_enabled) @python_code = args[:python_code] if args.key?(:python_code) end |