Class: Kernai::InstructionBuilder
- Inherits:
-
Object
- Object
- Kernai::InstructionBuilder
- Defined in:
- lib/kernai/instruction_builder.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(base_instructions, model: Models::TEXT_ONLY, skills: nil, protocols: nil, workflow_enabled: true) ⇒ InstructionBuilder
constructor
A new instance of InstructionBuilder.
Constructor Details
#initialize(base_instructions, model: Models::TEXT_ONLY, skills: nil, protocols: nil, workflow_enabled: true) ⇒ InstructionBuilder
Returns a new instance of InstructionBuilder.
5 6 7 8 9 10 11 |
# File 'lib/kernai/instruction_builder.rb', line 5 def initialize(base_instructions, model: Models::TEXT_ONLY, skills: nil, protocols: nil, workflow_enabled: true) @base_instructions = base_instructions @model = model @skills = skills @protocols = protocols @workflow_enabled = workflow_enabled end |
Instance Method Details
#build ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/kernai/instruction_builder.rb', line 13 def build base = resolve_base return base unless actionable? [base, block_protocol, *capability_sections].join("\n\n") end |