pub trait Step {
type Output: Send;
type Error: Send + Debug + Error + StepError;
// Required method
fn format(
&self,
parameters: &Parameters
) -> Result<Self::Output, Self::Error>;
}
Expand description
The Step
trait represents a single step in a chain. It takes a set of parameters and returns a
formatted prompt that can be used by an executor.
Required Associated Types§
Required Methods§
sourcefn format(&self, parameters: &Parameters) -> Result<Self::Output, Self::Error>
fn format(&self, parameters: &Parameters) -> Result<Self::Output, Self::Error>
Formats the step given a set of parameters, returning a value that can be used by an executor.
Parameters
parameters
: The parameters used to format the step.
Returns
The formatted output of this step or an error if the step could not be formatted.