Class: Rubyagents::PlanningStep
- Inherits:
-
Data
- Object
- Data
- Rubyagents::PlanningStep
- Defined in:
- lib/rubyagents/memory.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#token_usage ⇒ Object
readonly
Returns the value of attribute token_usage.
Instance Method Summary collapse
Instance Attribute Details
#duration ⇒ Object (readonly)
Returns the value of attribute duration
21 22 23 |
# File 'lib/rubyagents/memory.rb', line 21 def duration @duration end |
#plan ⇒ Object (readonly)
Returns the value of attribute plan
21 22 23 |
# File 'lib/rubyagents/memory.rb', line 21 def plan @plan end |
#token_usage ⇒ Object (readonly)
Returns the value of attribute token_usage
21 22 23 |
# File 'lib/rubyagents/memory.rb', line 21 def token_usage @token_usage end |
Instance Method Details
#to_h ⇒ Object
22 23 24 25 26 |
# File 'lib/rubyagents/memory.rb', line 22 def to_h h = { type: "planning", plan: plan, duration: duration } h[:token_usage] = token_usage.to_h if token_usage h end |