Class: SolidLoop::LlmMetrics
- Inherits:
-
Struct
- Object
- Struct
- SolidLoop::LlmMetrics
- Defined in:
- lib/solid_loop/llm_metrics.rb
Overview
Value object to hold raw timing and token metrics from the network layer.
Instance Attribute Summary collapse
-
#duration_generation ⇒ Object
Returns the value of attribute duration_generation.
-
#duration_thinking ⇒ Object
Returns the value of attribute duration_thinking.
-
#tokens_completion ⇒ Object
Returns the value of attribute tokens_completion.
-
#ttft ⇒ Object
Returns the value of attribute ttft.
Instance Method Summary collapse
Instance Attribute Details
#duration_generation ⇒ Object
Returns the value of attribute duration_generation
5 6 7 |
# File 'lib/solid_loop/llm_metrics.rb', line 5 def duration_generation @duration_generation end |
#duration_thinking ⇒ Object
Returns the value of attribute duration_thinking
5 6 7 |
# File 'lib/solid_loop/llm_metrics.rb', line 5 def duration_thinking @duration_thinking end |
#tokens_completion ⇒ Object
Returns the value of attribute tokens_completion
5 6 7 |
# File 'lib/solid_loop/llm_metrics.rb', line 5 def tokens_completion @tokens_completion end |
#ttft ⇒ Object
Returns the value of attribute ttft
5 6 7 |
# File 'lib/solid_loop/llm_metrics.rb', line 5 def ttft @ttft end |
Instance Method Details
#to_h ⇒ Object
12 13 14 |
# File 'lib/solid_loop/llm_metrics.rb', line 12 def to_h super.to_h.compact end |