Trait langchain_rust::prompt::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§