Class: Google::ADK::ReadonlyContext
- Inherits:
-
Object
- Object
- Google::ADK::ReadonlyContext
- Defined in:
- lib/google/adk/context.rb
Overview
Read-only context for accessing state
Direct Known Subclasses
Instance Attribute Summary collapse
-
#agent_name ⇒ Object
readonly
Returns the value of attribute agent_name.
-
#invocation_id ⇒ Object
readonly
Returns the value of attribute invocation_id.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(invocation_id:, agent_name:, state:) ⇒ ReadonlyContext
constructor
Initialize readonly context.
Constructor Details
#initialize(invocation_id:, agent_name:, state:) ⇒ ReadonlyContext
Initialize readonly context
53 54 55 56 57 |
# File 'lib/google/adk/context.rb', line 53 def initialize(invocation_id:, agent_name:, state:) @invocation_id = invocation_id @agent_name = agent_name @state = state.freeze end |
Instance Attribute Details
#agent_name ⇒ Object (readonly)
Returns the value of attribute agent_name.
46 47 48 |
# File 'lib/google/adk/context.rb', line 46 def agent_name @agent_name end |
#invocation_id ⇒ Object (readonly)
Returns the value of attribute invocation_id.
46 47 48 |
# File 'lib/google/adk/context.rb', line 46 def invocation_id @invocation_id end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
46 47 48 |
# File 'lib/google/adk/context.rb', line 46 def state @state end |