pub struct ProcedureEnhancer { /* private fields */ }Expand description
Rewrites an observed procedure into a reusable one with a model: a purpose name, a general trigger and clean steps.
Implementations§
Source§impl ProcedureEnhancer
impl ProcedureEnhancer
pub fn new(provider: Arc<dyn Provider>, model: impl Into<String>) -> Self
Sourcepub async fn enhance(
&self,
procedure: &Procedure,
task_description: &str,
) -> Option<Procedure>
pub async fn enhance( &self, procedure: &Procedure, task_description: &str, ) -> Option<Procedure>
The enhanced procedure, or None when the model fails, declines it
as too specific (skip), or returns no name or trigger. Steps whose
count differs from the original by more than one are not trusted;
the original steps are kept.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProcedureEnhancer
impl !UnwindSafe for ProcedureEnhancer
impl Forget for ProcedureEnhancer
impl Freeze for ProcedureEnhancer
impl Move for ProcedureEnhancer
impl Send for ProcedureEnhancer
impl Sync for ProcedureEnhancer
impl Unpin for ProcedureEnhancer
impl UnsafeUnpin for ProcedureEnhancer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more