Class: A2UI::UIGenerator
- Inherits:
-
DSPy::Module
- Object
- DSPy::Module
- A2UI::UIGenerator
- Extended by:
- T::Sig
- Defined in:
- lib/a2ui/modules/ui_generator.rb
Instance Method Summary collapse
- #forward(**input_values) ⇒ Object
-
#initialize ⇒ UIGenerator
constructor
A new instance of UIGenerator.
Constructor Details
#initialize ⇒ UIGenerator
Returns a new instance of UIGenerator.
9 10 11 12 |
# File 'lib/a2ui/modules/ui_generator.rb', line 9 def initialize super @predictor = DSPy::ChainOfThought.new(GenerateUI) end |
Instance Method Details
#forward(**input_values) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/a2ui/modules/ui_generator.rb', line 17 def forward(**input_values) @predictor.call( request: input_values.fetch(:request), surface_id: input_values.fetch(:surface_id), available_data: input_values.fetch(:available_data, '{}') ) end |