Class: Roast::Workflow::PromptStep
- Defined in:
- lib/roast/workflow/prompt_step.rb
Instance Attribute Summary
Attributes inherited from BaseStep
#available_tools, #coerce_to, #context_path, #json, #model, #name, #params, #print_response, #resource, #workflow
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(workflow, **kwargs) ⇒ PromptStep
constructor
A new instance of PromptStep.
Constructor Details
#initialize(workflow, **kwargs) ⇒ PromptStep
Returns a new instance of PromptStep.
6 7 8 |
# File 'lib/roast/workflow/prompt_step.rb', line 6 def initialize(workflow, **kwargs) super(workflow, **kwargs) end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/roast/workflow/prompt_step.rb', line 10 def call prompt(name) result = chat_completion(print_response:, json:, params:) # Apply coercion if configured apply_coercion(result) end |