Trait PromptFromatter

Source
pub trait PromptFromatter: Send + Sync {
    // Required methods
    fn template(&self) -> String;
    fn variables(&self) -> Vec<String>;
    fn format(&self, input_variables: PromptArgs) -> Result<String, PromptError>;
}

Required Methods§

Source

fn template(&self) -> String

Source

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

Source

fn format(&self, input_variables: PromptArgs) -> Result<String, PromptError>

Trait Implementations§

Source§

impl<PA> From<PA> for Box<dyn PromptFromatter>
where PA: PromptFromatter + 'static,

Source§

fn from(prompt: PA) -> Self

Converts to this type from the input type.

Implementors§