pub trait MessageFormatter: Send + Sync {
// Required methods
fn format_messages(
&self,
input_variables: PromptArgs,
) -> Result<Vec<Message>, PromptError>;
fn input_variables(&self) -> Vec<String>;
}
Expand description
Represents a generic template for formatting messages.
Required Methods§
fn format_messages( &self, input_variables: PromptArgs, ) -> Result<Vec<Message>, PromptError>
Sourcefn input_variables(&self) -> Vec<String>
fn input_variables(&self) -> Vec<String>
Returns a list of required input variable names for the template.