Class: Legion::LLM::Router::OutcomeClassifier::GlobalTransition
- Inherits:
-
Object
- Object
- Legion::LLM::Router::OutcomeClassifier::GlobalTransition
- Defined in:
- lib/legion/llm/router/outcome_classifier.rb
Overview
Immutable global-availability transition. The only accepted kind is :instance_unavailable; identity/token/reason come from the AttemptContext and normalized outcome.
Instance Attribute Summary collapse
-
#instance_key ⇒ Object
readonly
Returns the value of attribute instance_key.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#publisher_token_id ⇒ Object
readonly
Returns the value of attribute publisher_token_id.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(instance_key:, publisher_token_id:, reason:, kind: :instance_unavailable) ⇒ GlobalTransition
constructor
A new instance of GlobalTransition.
Constructor Details
#initialize(instance_key:, publisher_token_id:, reason:, kind: :instance_unavailable) ⇒ GlobalTransition
Returns a new instance of GlobalTransition.
18 19 20 21 22 23 24 25 26 |
# File 'lib/legion/llm/router/outcome_classifier.rb', line 18 def initialize(instance_key:, publisher_token_id:, reason:, kind: :instance_unavailable) raise ArgumentError, "unsupported global transition kind: #{kind.inspect}" unless kind == :instance_unavailable @kind = kind @instance_key = instance_key @publisher_token_id = publisher_token_id @reason = reason freeze end |
Instance Attribute Details
#instance_key ⇒ Object (readonly)
Returns the value of attribute instance_key.
16 17 18 |
# File 'lib/legion/llm/router/outcome_classifier.rb', line 16 def instance_key @instance_key end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
16 17 18 |
# File 'lib/legion/llm/router/outcome_classifier.rb', line 16 def kind @kind end |
#publisher_token_id ⇒ Object (readonly)
Returns the value of attribute publisher_token_id.
16 17 18 |
# File 'lib/legion/llm/router/outcome_classifier.rb', line 16 def publisher_token_id @publisher_token_id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
16 17 18 |
# File 'lib/legion/llm/router/outcome_classifier.rb', line 16 def reason @reason end |