Class: RobotLab::HistoryCompressor::SUMMARY_STRUCT
- Inherits:
-
Struct
- Object
- Struct
- RobotLab::HistoryCompressor::SUMMARY_STRUCT
- Defined in:
- lib/robot_lab/history_compressor.rb
Overview
Minimal duck-type for a summary replacement message compatible with RubyLLM::Chat’s message array. Preserves the original message role so user/assistant turn ordering is maintained after compression.
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#role ⇒ Object
Returns the value of attribute role.
-
#stop_reason ⇒ Object
Returns the value of attribute stop_reason.
-
#tool_calls ⇒ Object
Returns the value of attribute tool_calls.
Instance Method Summary collapse
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content
31 32 33 |
# File 'lib/robot_lab/history_compressor.rb', line 31 def content @content end |
#role ⇒ Object
Returns the value of attribute role
31 32 33 |
# File 'lib/robot_lab/history_compressor.rb', line 31 def role @role end |
#stop_reason ⇒ Object
Returns the value of attribute stop_reason
31 32 33 |
# File 'lib/robot_lab/history_compressor.rb', line 31 def stop_reason @stop_reason end |
#tool_calls ⇒ Object
Returns the value of attribute tool_calls
31 32 33 |
# File 'lib/robot_lab/history_compressor.rb', line 31 def tool_calls @tool_calls end |
Instance Method Details
#assistant? ⇒ Boolean
36 |
# File 'lib/robot_lab/history_compressor.rb', line 36 def assistant? = role == :assistant |
#system? ⇒ Boolean
34 |
# File 'lib/robot_lab/history_compressor.rb', line 34 def system? = role == :system |
#text? ⇒ Boolean
32 |
# File 'lib/robot_lab/history_compressor.rb', line 32 def text? = true |
#tool_use? ⇒ Boolean
33 |
# File 'lib/robot_lab/history_compressor.rb', line 33 def tool_use? = false |
#user? ⇒ Boolean
35 |
# File 'lib/robot_lab/history_compressor.rb', line 35 def user? = role == :user |