pub struct Prompt { /* private fields */ }Expand description
Combined system + user messages for an inference call.
Implementations§
Source§impl Prompt
impl Prompt
Sourcepub fn new(system: Arc<str>, user: Arc<str>) -> Self
pub fn new(system: Arc<str>, user: Arc<str>) -> Self
Create a new Prompt from raw system and user strings.
Sourcepub fn generate(
workflow: Arc<dyn WorkflowLike>,
context: &mut dyn ContextLike,
capability: &Capability,
) -> Self
pub fn generate( workflow: Arc<dyn WorkflowLike>, context: &mut dyn ContextLike, capability: &Capability, ) -> Self
Inference a Prompt from a workflow for a given model capability.
This is the high-level orchestration used by the inference pipeline. It is deterministic and side-effect free aside from evaluating rules via the provided context.
Trait Implementations§
impl StructuralPartialEq for Prompt
Auto Trait Implementations§
impl Freeze for Prompt
impl RefUnwindSafe for Prompt
impl Send for Prompt
impl Sync for Prompt
impl Unpin for Prompt
impl UnwindSafe for Prompt
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