pub struct TemplateBuilder { /* private fields */ }
Expand description
Template builder for creating common prompt templates
Implementations§
Source§impl TemplateBuilder
impl TemplateBuilder
pub fn new(format_type: FormatType) -> Self
pub fn with_instruction(self, instruction: &str) -> Self
pub fn with_reasoning(self, include: bool) -> Self
pub fn with_custom_examples_section(self, section: &str) -> Self
pub fn build(&self) -> String
pub fn build_with_variables( self, variables: HashMap<String, String>, ) -> LangExtractResult<String>
Auto Trait Implementations§
impl Freeze for TemplateBuilder
impl RefUnwindSafe for TemplateBuilder
impl Send for TemplateBuilder
impl Sync for TemplateBuilder
impl Unpin for TemplateBuilder
impl UnwindSafe for TemplateBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more