pub struct AgentBuilder { /* private fields */ }Expand description
Agent builder
Implementations§
Source§impl AgentBuilder
impl AgentBuilder
pub fn new(provider: Box<dyn Provider>) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn model_name(self, name: impl Into<String>) -> Self
pub fn max_tokens(self, tokens: u32) -> Self
pub fn think(self, enabled: bool) -> Self
pub fn approve_mode(self, mode: ApproveMode) -> Self
pub fn tool(self, tool: Arc<dyn Tool>) -> Self
Sourcepub fn event_tx(self, tx: Sender<AgentEvent>) -> Self
pub fn event_tx(self, tx: Sender<AgentEvent>) -> Self
Set external event sender for streaming events
Sourcepub fn profile(self, profile: PromptProfile) -> Self
pub fn profile(self, profile: PromptProfile) -> Self
Set prompt profile
pub fn build(self) -> Agent
Auto Trait Implementations§
impl Freeze for AgentBuilder
impl !RefUnwindSafe for AgentBuilder
impl Send for AgentBuilder
impl Sync for AgentBuilder
impl Unpin for AgentBuilder
impl UnsafeUnpin for AgentBuilder
impl !UnwindSafe 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