pub struct AgentBuilder<P: Provider + 'static> { /* private fields */ }Expand description
Fluent builder for Agent<P>.
Requires a model at construction. Use AgentConfig builder methods
for field configuration, then pass it via AgentBuilder::config.
Implementations§
Source§impl<P: Provider + 'static> AgentBuilder<P>
impl<P: Provider + 'static> AgentBuilder<P>
Sourcepub fn config(self, config: AgentConfig) -> Self
pub fn config(self, config: AgentConfig) -> Self
Set the full config, replacing all fields.
Sourcepub fn dispatcher(self, dispatcher: Arc<dyn ToolDispatcher>) -> Self
pub fn dispatcher(self, dispatcher: Arc<dyn ToolDispatcher>) -> Self
Set the tool dispatcher for executing tool calls.
Auto Trait Implementations§
impl<P> Freeze for AgentBuilder<P>
impl<P> !RefUnwindSafe for AgentBuilder<P>
impl<P> Send for AgentBuilder<P>
impl<P> Sync for AgentBuilder<P>
impl<P> Unpin for AgentBuilder<P>
impl<P> UnsafeUnpin for AgentBuilder<P>
impl<P> !UnwindSafe for AgentBuilder<P>
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