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§

source

fn format_messages( &self, input_variables: PromptArgs ) -> Result<Vec<Message>, PromptError>

source

fn input_variables(&self) -> Vec<String>

Returns a list of required input variable names for the template.

Implementors§