Class: LlmConductor::DataBuilder
- Inherits:
-
Object
- Object
- LlmConductor::DataBuilder
- Defined in:
- lib/llm_conductor/data_builder.rb
Overview
Base class for building structured data from source objects for LLM consumption. Provides helper methods for data extraction, formatting, and safe handling of nested data.
Instance Attribute Summary collapse
-
#source_object ⇒ Object
readonly
Returns the value of attribute source_object.
Instance Method Summary collapse
-
#build ⇒ Hash
Abstract method to be implemented by subclasses.
-
#initialize(source_object) ⇒ DataBuilder
constructor
A new instance of DataBuilder.
Constructor Details
#initialize(source_object) ⇒ DataBuilder
Returns a new instance of DataBuilder.
31 32 33 |
# File 'lib/llm_conductor/data_builder.rb', line 31 def initialize(source_object) @source_object = source_object end |
Instance Attribute Details
#source_object ⇒ Object (readonly)
Returns the value of attribute source_object.
29 30 31 |
# File 'lib/llm_conductor/data_builder.rb', line 29 def source_object @source_object end |
Instance Method Details
#build ⇒ Hash
Abstract method to be implemented by subclasses
37 38 39 |
# File 'lib/llm_conductor/data_builder.rb', line 37 def build raise NotImplementedError, "#{self.class} must implement the #build method" end |