Output Strategy Interface
Output Strategy Interface
new()Initialize the strategy.
OutputStrategy$new()
get_instruction()Get the system prompt instruction for this strategy.
OutputStrategy$get_instruction()A character string with instructions for the LLM.
validate()Parse and validate the output text.
OutputStrategy$validate(text, is_final = FALSE)textThe raw text output from the LLM.
is_finalLogical, TRUE if this is the final output (not streaming).
The parsed and validated object.
clone()The objects of this class are cloneable with this method.
OutputStrategy$clone(deep = FALSE)deepWhether to make a deep clone.
Abstract R6 class defining the interface for output strategies.
Subclasses must implement get_instruction() and validate().