Class: RubyLLM::Agents::Tracker Private
- Inherits:
-
Object
- Object
- RubyLLM::Agents::Tracker
- Defined in:
- lib/ruby_llm/agents/tracker.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Internal collector used by RubyLLM::Agents.track to accumulate Result objects produced during a tracked block.
Not part of the public API — users interact with TrackReport instead.
Instance Attribute Summary collapse
- #defaults ⇒ Object readonly private
- #request_id ⇒ Object readonly private
- #results ⇒ Object readonly private
- #tags ⇒ Object readonly private
Instance Method Summary collapse
- #<<(result) ⇒ Object private
-
#initialize(defaults: {}, request_id: nil, tags: {}) ⇒ Tracker
constructor
private
A new instance of Tracker.
Constructor Details
#initialize(defaults: {}, request_id: nil, tags: {}) ⇒ Tracker
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Tracker.
14 15 16 17 18 19 |
# File 'lib/ruby_llm/agents/tracker.rb', line 14 def initialize(defaults: {}, request_id: nil, tags: {}) @results = [] @defaults = defaults @request_id = request_id || generate_request_id @tags = end |
Instance Attribute Details
#defaults ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/ruby_llm/agents/tracker.rb', line 12 def defaults @defaults end |
#request_id ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/ruby_llm/agents/tracker.rb', line 12 def request_id @request_id end |
#results ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/ruby_llm/agents/tracker.rb', line 12 def results @results end |
#tags ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/ruby_llm/agents/tracker.rb', line 12 def @tags end |
Instance Method Details
#<<(result) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/ruby_llm/agents/tracker.rb', line 21 def <<(result) @results << result end |