pub struct PromptTemplateBuilder {
segments: Vec<PromptSegment>,
}Expand description
Builder for PromptTemplate.
Only accepts &'static str and ScrubbedText — no arbitrary String.
Fields§
§segments: Vec<PromptSegment>Implementations§
Source§impl PromptTemplateBuilder
impl PromptTemplateBuilder
Sourcepub fn static_text(self, s: &'static str) -> Self
pub fn static_text(self, s: &'static str) -> Self
Append a static text segment (must be a &'static str literal).
Sourcepub fn scrubbed(self, t: ScrubbedText) -> Self
pub fn scrubbed(self, t: ScrubbedText) -> Self
Append pre-scrubbed content.
Sourcepub fn build(self) -> PromptTemplate
pub fn build(self) -> PromptTemplate
Build the prompt template.
Auto Trait Implementations§
impl Freeze for PromptTemplateBuilder
impl RefUnwindSafe for PromptTemplateBuilder
impl Send for PromptTemplateBuilder
impl Sync for PromptTemplateBuilder
impl Unpin for PromptTemplateBuilder
impl UnwindSafe for PromptTemplateBuilder
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