pub struct PromptCompiler;Expand description
Pure deterministic prompt compiler.
Implementations§
Source§impl PromptCompiler
impl PromptCompiler
Sourcepub fn compile(
&self,
modules: impl IntoIterator<Item = PromptModule>,
budget: PromptBudget,
) -> Result<CompiledPrompt, ContextError>
pub fn compile( &self, modules: impl IntoIterator<Item = PromptModule>, budget: PromptBudget, ) -> Result<CompiledPrompt, ContextError>
Selects, budgets, renders, and inspects prompt modules.
§Errors
Returns an error for oversized input, divergent duplicate identities, ambiguous equal-precedence conflicts, or required budget overflow.
Trait Implementations§
Source§impl Clone for PromptCompiler
impl Clone for PromptCompiler
Source§fn clone(&self) -> PromptCompiler
fn clone(&self) -> PromptCompiler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PromptCompiler
Source§impl Debug for PromptCompiler
impl Debug for PromptCompiler
Source§impl Default for PromptCompiler
impl Default for PromptCompiler
Source§fn default() -> PromptCompiler
fn default() -> PromptCompiler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PromptCompiler
impl RefUnwindSafe for PromptCompiler
impl Send for PromptCompiler
impl Sync for PromptCompiler
impl Unpin for PromptCompiler
impl UnsafeUnpin for PromptCompiler
impl UnwindSafe for PromptCompiler
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