Class: Agents::RunContext
- Inherits:
-
Object
- Object
- Agents::RunContext
- Defined in:
- lib/agents/run_context.rb
Defined Under Namespace
Classes: Usage
Instance Attribute Summary collapse
-
#callback_manager ⇒ Object
readonly
Returns the value of attribute callback_manager.
-
#callbacks ⇒ Object
readonly
Returns the value of attribute callbacks.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
-
#initialize(context, callbacks: {}) ⇒ RunContext
constructor
Initialize a new RunContext with execution context and usage tracking.
Constructor Details
#initialize(context, callbacks: {}) ⇒ RunContext
Initialize a new RunContext with execution context and usage tracking
65 66 67 68 69 70 |
# File 'lib/agents/run_context.rb', line 65 def initialize(context, callbacks: {}) @context = context @usage = Usage.new @callbacks = callbacks || {} @callback_manager = CallbackManager.new(@callbacks) end |
Instance Attribute Details
#callback_manager ⇒ Object (readonly)
Returns the value of attribute callback_manager.
59 60 61 |
# File 'lib/agents/run_context.rb', line 59 def callback_manager @callback_manager end |
#callbacks ⇒ Object (readonly)
Returns the value of attribute callbacks.
59 60 61 |
# File 'lib/agents/run_context.rb', line 59 def callbacks @callbacks end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
59 60 61 |
# File 'lib/agents/run_context.rb', line 59 def context @context end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
59 60 61 |
# File 'lib/agents/run_context.rb', line 59 def usage @usage end |