Class: Aireview::LlmRouter::Visit

Inherits:
Struct
  • Object
show all
Defined in:
lib/aireview/llm_router.rb

Overview

A journal entry about a visit to a route, for the error message: either the kind of failure with the number of requests, or a note on why the route was skipped.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#error ⇒ Object

Returns the value of attribute error

Returns:

  • (Object) —

    the current value of error



29
30
31
# File 'lib/aireview/llm_router.rb', line 29

def error
  @error
end

#kind ⇒ Object

Returns the value of attribute kind

Returns:

  • (Object) —

    the current value of kind



29
30
31
# File 'lib/aireview/llm_router.rb', line 29

def kind
  @kind
end

#note ⇒ Object

Returns the value of attribute note

Returns:

  • (Object) —

    the current value of note



29
30
31
# File 'lib/aireview/llm_router.rb', line 29

def note
  @note
end

#route ⇒ Object

Returns the value of attribute route

Returns:

  • (Object) —

    the current value of route



29
30
31
# File 'lib/aireview/llm_router.rb', line 29

def route
  @route
end

#tries ⇒ Object

Returns the value of attribute tries

Returns:

  • (Object) —

    the current value of tries



29
30
31
# File 'lib/aireview/llm_router.rb', line 29

def tries
  @tries
end

Instance Method Details

#to_s ⇒ Object



30
31
32
# File 'lib/aireview/llm_router.rb', line 30

def to_s
  "#{route}: #{note || "#{LlmRouter::KIND_LABELS.fetch(kind)} after #{tries} attempt(s)"}"
end