pub struct AgentBuilder { /* private fields */ }Expand description
Implementations§
Source§impl AgentBuilder
impl AgentBuilder
pub fn new() -> Self
Sourcepub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
A system-level prompt that prefixes every interaction.
Sourcepub fn on_tool_call<F>(self, f: F) -> Self
pub fn on_tool_call<F>(self, f: F) -> Self
Fired when a tool call is detected (before execution).
Sourcepub fn on_tool_result<F>(self, f: F) -> Self
pub fn on_tool_result<F>(self, f: F) -> Self
Fired when a tool execution completes.
Sourcepub fn on_turn_start<F>(self, f: F) -> Self
pub fn on_turn_start<F>(self, f: F) -> Self
Fired at the start of each ReAct turn.
Sourcepub fn on_turn_end<F>(self, f: F) -> Self
pub fn on_turn_end<F>(self, f: F) -> Self
Fired at the end of each ReAct turn.
Sourcepub fn on_event<F>(self, f: F) -> Self
pub fn on_event<F>(self, f: F) -> Self
Fired for every AgentEvent (catch-all).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AgentBuilder
impl !UnwindSafe for AgentBuilder
impl Freeze for AgentBuilder
impl Send for AgentBuilder
impl Sync for AgentBuilder
impl Unpin for AgentBuilder
impl UnsafeUnpin for AgentBuilder
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