Class: SolidLoop::LlmMetrics

Inherits:
Struct
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#duration_generationObject

Returns the value of attribute duration_generation

Returns:

  • (Object)

    the current value of duration_generation



5
6
7
# File 'lib/solid_loop/llm_metrics.rb', line 5

def duration_generation
  @duration_generation
end

#duration_thinkingObject

Returns the value of attribute duration_thinking

Returns:

  • (Object)

    the current value of duration_thinking



5
6
7
# File 'lib/solid_loop/llm_metrics.rb', line 5

def duration_thinking
  @duration_thinking
end

#tokens_completionObject

Returns the value of attribute tokens_completion

Returns:

  • (Object)

    the current value of tokens_completion



5
6
7
# File 'lib/solid_loop/llm_metrics.rb', line 5

def tokens_completion
  @tokens_completion
end

#ttftObject

Returns the value of attribute ttft

Returns:

  • (Object)

    the current value of ttft



5
6
7
# File 'lib/solid_loop/llm_metrics.rb', line 5

def ttft
  @ttft
end

Instance Method Details

#to_hObject



12
13
14
# File 'lib/solid_loop/llm_metrics.rb', line 12

def to_h
  super.to_h.compact
end