pub struct AgentConfig {
pub model: Model,
pub thinking_level: ThinkingLevel,
pub stream_options: StreamOptions,
pub max_turns: u32,
pub tools: Vec<Arc<dyn AgentTool>>,
pub system_prompt: String,
pub permission: Arc<dyn PermissionPolicy>,
}Expand description
Agent configuration controlling the loop.
Fields§
§model: Model§thinking_level: ThinkingLevel§stream_options: StreamOptions§max_turns: u32§tools: Vec<Arc<dyn AgentTool>>§system_prompt: String§permission: Arc<dyn PermissionPolicy>Implementations§
Source§impl AgentConfig
impl AgentConfig
pub fn new(model: Model, system_prompt: impl Into<String>) -> Self
pub fn with_tools(self, tools: Vec<Arc<dyn AgentTool>>) -> Self
pub fn with_max_turns(self, n: u32) -> Self
pub fn with_permission(self, p: Arc<dyn PermissionPolicy>) -> Self
pub fn with_thinking(self, level: ThinkingLevel) -> Self
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentConfig
impl !RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnsafeUnpin for AgentConfig
impl !UnwindSafe for AgentConfig
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