Class: Phronomy::Agent::LLMInputPatch

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

Overview

Typed, canonicalizable input customization returned by before_llm_input. v1 deliberately exposes only fields that are fully applied to every call.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model_config_patch: nil, segment_candidates: nil) ⇒ LLMInputPatch

Returns a new instance of LLMInputPatch.



8
9
10
11
12
13
14
# File 'lib/phronomy/agent/llm_input_patch.rb', line 8

def initialize(model_config_patch: nil, segment_candidates: nil)
  super(
    model_config_patch: model_config_patch && Immutable.copy(model_config_patch),
    segment_candidates: segment_candidates && Immutable.copy(Array(segment_candidates))
  )
  freeze
end

Instance Attribute Details

#model_config_patchObject (readonly)

Returns the value of attribute model_config_patch

Returns:

  • (Object)

    the current value of model_config_patch



7
8
9
# File 'lib/phronomy/agent/llm_input_patch.rb', line 7

def model_config_patch
  @model_config_patch
end

#segment_candidatesObject (readonly)

Returns the value of attribute segment_candidates

Returns:

  • (Object)

    the current value of segment_candidates



7
8
9
# File 'lib/phronomy/agent/llm_input_patch.rb', line 7

def segment_candidates
  @segment_candidates
end

Class Method Details

.emptyObject



16
17
18
# File 'lib/phronomy/agent/llm_input_patch.rb', line 16

def self.empty
  new
end