pub struct AgentConfig {
pub system_prompt: String,
pub max_iterations: usize,
pub verbose: bool,
pub conversation_mode: ConversationMode,
pub max_conversation_length: usize,
}Expand description
Agent configuration
Fields§
§system_prompt: StringSystem prompt that defines agent behavior
max_iterations: usizeMaximum iterations before stopping (prevents infinite loops)
verbose: boolWhether to show verbose output
conversation_mode: ConversationModeConversation mode
max_conversation_length: usizeMaximum conversation history length (for stateful mode)
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
Set system prompt
Sourcepub fn with_max_iterations(self, max: usize) -> Self
pub fn with_max_iterations(self, max: usize) -> Self
Set max iterations
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Enable verbose output
Sourcepub fn with_conversation_mode(self, mode: ConversationMode) -> Self
pub fn with_conversation_mode(self, mode: ConversationMode) -> Self
Set conversation mode
Sourcepub fn with_max_conversation_length(self, length: usize) -> Self
pub fn with_max_conversation_length(self, length: usize) -> Self
Set max conversation length
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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentConfig
impl Debug for AgentConfig
Source§impl Default for AgentConfig
impl Default for AgentConfig
Source§impl<'de> Deserialize<'de> for AgentConfig
impl<'de> Deserialize<'de> for AgentConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin 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