pub struct FnPlugin<F: FnOnce(AgentBuilder) -> AgentBuilder>(pub F);Expand description
Closure-based plugin. Use when you don’t want a named type.
Tuple Fields§
§0: FTrait Implementations§
Source§impl<F: FnOnce(AgentBuilder) -> AgentBuilder> AgentPlugin for FnPlugin<F>
impl<F: FnOnce(AgentBuilder) -> AgentBuilder> AgentPlugin for FnPlugin<F>
Source§fn install(self, builder: AgentBuilder) -> AgentBuilder
fn install(self, builder: AgentBuilder) -> AgentBuilder
Mutate the builder. Typical body: register tools, push middleware,
set system-prompt fragments.
Auto Trait Implementations§
impl<F> Freeze for FnPlugin<F>where
F: Freeze,
impl<F> RefUnwindSafe for FnPlugin<F>where
F: RefUnwindSafe,
impl<F> Send for FnPlugin<F>where
F: Send,
impl<F> Sync for FnPlugin<F>where
F: Sync,
impl<F> Unpin for FnPlugin<F>where
F: Unpin,
impl<F> UnsafeUnpin for FnPlugin<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for FnPlugin<F>where
F: UnwindSafe,
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