Class: Google::ADK::EventActions
- Inherits:
-
Object
- Object
- Google::ADK::EventActions
- Defined in:
- lib/google/adk/events.rb
Overview
Manages agent actions and state changes
Instance Attribute Summary collapse
-
#agent_state ⇒ Object
Returns the value of attribute agent_state.
-
#artifact_delta ⇒ Object
Returns the value of attribute artifact_delta.
-
#compaction ⇒ Object
Returns the value of attribute compaction.
-
#end_of_agent ⇒ Object
Returns the value of attribute end_of_agent.
-
#escalate ⇒ Object
Returns the value of attribute escalate.
-
#requested_auth_configs ⇒ Object
Returns the value of attribute requested_auth_configs.
-
#requested_tool_confirmations ⇒ Object
Returns the value of attribute requested_tool_confirmations.
-
#rewind_before_invocation_id ⇒ Object
Returns the value of attribute rewind_before_invocation_id.
-
#skip_summarization ⇒ Object
Returns the value of attribute skip_summarization.
-
#state_delta ⇒ Object
Returns the value of attribute state_delta.
-
#transfer_to_agent ⇒ Object
Returns the value of attribute transfer_to_agent.
Instance Method Summary collapse
-
#initialize(state_delta: {}, agent_state: nil, artifact_delta: {}, transfer_to_agent: nil, escalate: false, skip_summarization: false, end_of_agent: false, requested_auth_configs: nil, requested_tool_confirmations: nil, rewind_before_invocation_id: nil, compaction: nil) ⇒ EventActions
constructor
Initialize event actions.
-
#to_h ⇒ Hash
Convert to hash, excluding nil and empty values.
Constructor Details
#initialize(state_delta: {}, agent_state: nil, artifact_delta: {}, transfer_to_agent: nil, escalate: false, skip_summarization: false, end_of_agent: false, requested_auth_configs: nil, requested_tool_confirmations: nil, rewind_before_invocation_id: nil, compaction: nil) ⇒ EventActions
Initialize event actions
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/google/adk/events.rb', line 83 def initialize(state_delta: {}, agent_state: nil, artifact_delta: {}, transfer_to_agent: nil, escalate: false, skip_summarization: false, end_of_agent: false, requested_auth_configs: nil, requested_tool_confirmations: nil, rewind_before_invocation_id: nil, compaction: nil) @state_delta = state_delta @agent_state = agent_state @artifact_delta = artifact_delta @transfer_to_agent = transfer_to_agent @escalate = escalate @skip_summarization = skip_summarization @end_of_agent = end_of_agent @requested_auth_configs = requested_auth_configs @requested_tool_confirmations = requested_tool_confirmations @rewind_before_invocation_id = rewind_before_invocation_id @compaction = compaction end |
Instance Attribute Details
#agent_state ⇒ Object
Returns the value of attribute agent_state.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def agent_state @agent_state end |
#artifact_delta ⇒ Object
Returns the value of attribute artifact_delta.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def artifact_delta @artifact_delta end |
#compaction ⇒ Object
Returns the value of attribute compaction.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def compaction @compaction end |
#end_of_agent ⇒ Object
Returns the value of attribute end_of_agent.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def end_of_agent @end_of_agent end |
#escalate ⇒ Object
Returns the value of attribute escalate.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def escalate @escalate end |
#requested_auth_configs ⇒ Object
Returns the value of attribute requested_auth_configs.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def requested_auth_configs @requested_auth_configs end |
#requested_tool_confirmations ⇒ Object
Returns the value of attribute requested_tool_confirmations.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def requested_tool_confirmations @requested_tool_confirmations end |
#rewind_before_invocation_id ⇒ Object
Returns the value of attribute rewind_before_invocation_id.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def rewind_before_invocation_id @rewind_before_invocation_id end |
#skip_summarization ⇒ Object
Returns the value of attribute skip_summarization.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def skip_summarization @skip_summarization end |
#state_delta ⇒ Object
Returns the value of attribute state_delta.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def state_delta @state_delta end |
#transfer_to_agent ⇒ Object
Returns the value of attribute transfer_to_agent.
68 69 70 |
# File 'lib/google/adk/events.rb', line 68 def transfer_to_agent @transfer_to_agent end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash, excluding nil and empty values
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/google/adk/events.rb', line 104 def to_h result = {} result[:state_delta] = @state_delta unless @state_delta.empty? result[:agent_state] = @agent_state unless @agent_state.nil? result[:artifact_delta] = @artifact_delta unless @artifact_delta.empty? result[:transfer_to_agent] = @transfer_to_agent unless @transfer_to_agent.nil? result[:escalate] = @escalate if @escalate result[:skip_summarization] = @skip_summarization if @skip_summarization result[:end_of_agent] = @end_of_agent if @end_of_agent result[:requested_auth_configs] = @requested_auth_configs unless @requested_auth_configs.nil? result[:requested_tool_confirmations] = @requested_tool_confirmations unless @requested_tool_confirmations.nil? result[:rewind_before_invocation_id] = @rewind_before_invocation_id unless @rewind_before_invocation_id.nil? result[:compaction] = @compaction unless @compaction.nil? result end |