pub struct AgentBuilder<M> { /* private fields */ }Expand description
Fluent builder for Agent.
Implementations§
Source§impl<M: CompletionModel> AgentBuilder<M>
impl<M: CompletionModel> AgentBuilder<M>
Sourcepub fn temperature(self, temperature: f64) -> Self
pub fn temperature(self, temperature: f64) -> Self
Set the sampling temperature.
Sourcepub fn max_tokens(self, max_tokens: u32) -> Self
pub fn max_tokens(self, max_tokens: u32) -> Self
Set the maximum tokens to generate.
Sourcepub fn max_iterations(self, n: u32) -> Self
pub fn max_iterations(self, n: u32) -> Self
Override the default iteration cap (10) for the tool-call loop.
Sourcepub fn thinking(self, enabled: bool) -> Self
pub fn thinking(self, enabled: bool) -> Self
Explicitly turn the model’s thinking/reasoning mode on (true) or
off (false). Leave unset to use the provider’s own default.
Best-effort and provider-specific — see
CompletionRequest::thinking
for exactly how each provider interprets this. Regardless of this
setting, Agent::prompt/Agent::chat only ever return the final
answer text — a reasoning trace, if the provider returns one, is
never mixed into it.
Auto Trait Implementations§
impl<M> !RefUnwindSafe for AgentBuilder<M>
impl<M> !Send for AgentBuilder<M>
impl<M> !Sync for AgentBuilder<M>
impl<M> !UnwindSafe for AgentBuilder<M>
impl<M> Freeze for AgentBuilder<M>where
M: Freeze,
impl<M> Unpin for AgentBuilder<M>where
M: Unpin,
impl<M> UnsafeUnpin for AgentBuilder<M>where
M: UnsafeUnpin,
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