pub struct PromptComposer<'a> { /* private fields */ }Expand description
Builder for composing prompts from multiple layers
Implementations§
Source§impl<'a> PromptComposer<'a>
impl<'a> PromptComposer<'a>
Sourcepub fn new(store: &'a PromptStore) -> Self
pub fn new(store: &'a PromptStore) -> Self
Create a new composer with the given prompt store
Sourcepub fn with_provider(self, family: ProviderFamily) -> Self
pub fn with_provider(self, family: ProviderFamily) -> Self
Add a provider-specific prompt layer
Sourcepub fn with_provider_auto(self, model_id: &str) -> Self
pub fn with_provider_auto(self, model_id: &str) -> Self
Auto-detect provider from model ID and add layer
Sourcepub fn with_verification(self) -> Self
pub fn with_verification(self) -> Self
Add verification instructions layer
Sourcepub fn with_verification_if(self, enabled: bool) -> Self
pub fn with_verification_if(self, enabled: bool) -> Self
Conditionally add verification layer
Sourcepub fn with_environment(self, context: EnvironmentContext) -> Self
pub fn with_environment(self, context: EnvironmentContext) -> Self
Add environment context layer
Sourcepub fn with_current_environment(self) -> Self
pub fn with_current_environment(self) -> Self
Add current environment context layer
Sourcepub fn with_custom(self, content: impl Into<String>) -> Self
pub fn with_custom(self, content: impl Into<String>) -> Self
Add a custom prompt section
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PromptComposer<'a>
impl<'a> RefUnwindSafe for PromptComposer<'a>
impl<'a> Send for PromptComposer<'a>
impl<'a> Sync for PromptComposer<'a>
impl<'a> Unpin for PromptComposer<'a>
impl<'a> UnsafeUnpin for PromptComposer<'a>
impl<'a> UnwindSafe for PromptComposer<'a>
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