Class: Aireview::LlmRouter::Route
- Inherits:
-
Struct
- Object
- Struct
- Aireview::LlmRouter::Route
- Defined in:
- lib/aireview/llm_router.rb
Overview
rubocop:disable Metrics/ClassLength
Instance Attribute Summary collapse
-
#candidate ⇒ Object
Returns the value of attribute candidate.
-
#candidate_index ⇒ Object
Returns the value of attribute candidate_index.
-
#key ⇒ Object
Returns the value of attribute key.
-
#key_count ⇒ Object
Returns the value of attribute key_count.
-
#key_index ⇒ Object
Returns the value of attribute key_index.
Instance Method Summary collapse
Instance Attribute Details
#candidate ⇒ Object
Returns the value of attribute candidate
16 17 18 |
# File 'lib/aireview/llm_router.rb', line 16 def candidate @candidate end |
#candidate_index ⇒ Object
Returns the value of attribute candidate_index
16 17 18 |
# File 'lib/aireview/llm_router.rb', line 16 def candidate_index @candidate_index end |
#key ⇒ Object
Returns the value of attribute key
16 17 18 |
# File 'lib/aireview/llm_router.rb', line 16 def key @key end |
#key_count ⇒ Object
Returns the value of attribute key_count
16 17 18 |
# File 'lib/aireview/llm_router.rb', line 16 def key_count @key_count end |
#key_index ⇒ Object
Returns the value of attribute key_index
16 17 18 |
# File 'lib/aireview/llm_router.rb', line 16 def key_index @key_index end |
Instance Method Details
#fallback? ⇒ Boolean
17 18 19 |
# File 'lib/aireview/llm_router.rb', line 17 def fallback? candidate_index.positive? end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/aireview/llm_router.rb', line 21 def to_s key_count > 1 ? "#{candidate} (key #{key_index + 1}/#{key_count})" : candidate.to_s end |