Module: Legion::LLM::EscalationHistory
- Defined in:
- lib/legion/llm/escalation_history.rb
Instance Attribute Summary collapse
-
#escalation_chain ⇒ Object
Returns the value of attribute escalation_chain.
-
#final_resolution ⇒ Object
Returns the value of attribute final_resolution.
Instance Method Summary collapse
- #escalated? ⇒ Boolean
- #escalation_history ⇒ Object
- #record_escalation_attempt(model:, provider:, tier:, outcome:, failures:, duration_ms:) ⇒ Object
Instance Attribute Details
#escalation_chain ⇒ Object
Returns the value of attribute escalation_chain.
6 7 8 |
# File 'lib/legion/llm/escalation_history.rb', line 6 def escalation_chain @escalation_chain end |
#final_resolution ⇒ Object
Returns the value of attribute final_resolution.
6 7 8 |
# File 'lib/legion/llm/escalation_history.rb', line 6 def final_resolution @final_resolution end |
Instance Method Details
#escalated? ⇒ Boolean
12 13 14 |
# File 'lib/legion/llm/escalation_history.rb', line 12 def escalated? escalation_history.size > 1 end |
#escalation_history ⇒ Object
8 9 10 |
# File 'lib/legion/llm/escalation_history.rb', line 8 def escalation_history @escalation_history ||= [] end |
#record_escalation_attempt(model:, provider:, tier:, outcome:, failures:, duration_ms:) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/legion/llm/escalation_history.rb', line 16 def record_escalation_attempt(model:, provider:, tier:, outcome:, failures:, duration_ms:) escalation_history << { model: model, provider: provider, tier: tier, outcome: outcome, failures: failures, duration_ms: duration_ms } end |