pub struct AgentConfigBuilder { /* private fields */ }Expand description
Builder for AgentConfig.
Implementations§
Source§impl AgentConfigBuilder
impl AgentConfigBuilder
Sourcepub fn system_prompt<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn system_prompt<VALUE: Into<String>>(self, value: VALUE) -> Self
System prompt
Sourcepub fn max_iterations(self, value: usize) -> Self
pub fn max_iterations(self, value: usize) -> Self
Maximum iterations before stopping
Sourcepub fn tool_choice(self, value: ToolChoice) -> Self
pub fn tool_choice(self, value: ToolChoice) -> Self
Tool choice strategy
Sourcepub fn enable_compaction(self, value: bool) -> Self
pub fn enable_compaction(self, value: bool) -> Self
Enable context compaction
Sourcepub fn compaction_threshold(self, value: f32) -> Self
pub fn compaction_threshold(self, value: f32) -> Self
Compaction threshold (ratio of context window)
Sourcepub fn include_cost(self, value: bool) -> Self
pub fn include_cost(self, value: bool) -> Self
Enable cost tracking
Sourcepub fn build(self) -> Result<AgentConfig, AgentConfigBuilderError>
pub fn build(self) -> Result<AgentConfig, AgentConfigBuilderError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentConfigBuilder
impl RefUnwindSafe for AgentConfigBuilder
impl Send for AgentConfigBuilder
impl Sync for AgentConfigBuilder
impl Unpin for AgentConfigBuilder
impl UnsafeUnpin for AgentConfigBuilder
impl UnwindSafe for AgentConfigBuilder
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