Class: FlowEngine::ClarificationResult
- Inherits:
-
Data
- Object
- Data
- FlowEngine::ClarificationResult
- Defined in:
- lib/flowengine/clarification_result.rb
Overview
Immutable result from an AI intake or clarification round.
Instance Attribute Summary collapse
-
#answered ⇒ Hash<Symbol, Object>
readonly
step_id => value pairs filled this round.
-
#follow_up ⇒ String?
readonly
clarifying question from the LLM, or nil if done.
-
#pending_steps ⇒ Array<Symbol>
readonly
step ids still unanswered after this round.
-
#round ⇒ Integer
readonly
current clarification round (1-based).
Instance Method Summary collapse
-
#done? ⇒ Boolean
True when the LLM has no more questions or max rounds reached.
-
#initialize(answered: {}, pending_steps: [], follow_up: nil, round: 1) ⇒ ClarificationResult
constructor
A new instance of ClarificationResult.
Constructor Details
#initialize(answered: {}, pending_steps: [], follow_up: nil, round: 1) ⇒ ClarificationResult
Returns a new instance of ClarificationResult.
11 12 13 14 |
# File 'lib/flowengine/clarification_result.rb', line 11 def initialize(answered: {}, pending_steps: [], follow_up: nil, round: 1) super freeze end |
Instance Attribute Details
#answered ⇒ Hash<Symbol, Object> (readonly)
step_id => value pairs filled this round
10 11 12 |
# File 'lib/flowengine/clarification_result.rb', line 10 def answered @answered end |
#follow_up ⇒ String? (readonly)
clarifying question from the LLM, or nil if done
10 11 12 |
# File 'lib/flowengine/clarification_result.rb', line 10 def follow_up @follow_up end |
#pending_steps ⇒ Array<Symbol> (readonly)
step ids still unanswered after this round
10 11 12 |
# File 'lib/flowengine/clarification_result.rb', line 10 def pending_steps @pending_steps end |
#round ⇒ Integer (readonly)
current clarification round (1-based)
10 11 12 |
# File 'lib/flowengine/clarification_result.rb', line 10 def round @round end |
Instance Method Details
#done? ⇒ Boolean
Returns true when the LLM has no more questions or max rounds reached.
17 18 19 |
# File 'lib/flowengine/clarification_result.rb', line 17 def done? follow_up.nil? end |