Class: Phronomy::Agent::LLMOperationResult Private

Inherits:
Object
  • Object
show all
Defined in:
lib/phronomy/agent/llm_operation_result.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Immutable carrier for one LLM adapter operation outcome.

Worker/timer threads create this value without mutating AgentInvocation. AgentInvocationSessionBuilder posts it as :llm_completed or :llm_failed, and AgentInvocation applies it on the EventLoop thread.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response: nil, error: nil, streaming: false) ⇒ LLMOperationResult

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of LLMOperationResult.



15
16
17
18
19
20
# File 'lib/phronomy/agent/llm_operation_result.rb', line 15

def initialize(response: nil, error: nil, streaming: false)
  @response = response
  @error = error
  @streaming = streaming
  freeze
end

Instance Attribute Details

#errorObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/phronomy/agent/llm_operation_result.rb', line 13

def error
  @error
end

#responseObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/phronomy/agent/llm_operation_result.rb', line 13

def response
  @response
end

#streamingObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/phronomy/agent/llm_operation_result.rb', line 13

def streaming
  @streaming
end