pub struct AgentConfig {
pub name: String,
pub system_prompt: String,
pub model: String,
pub temperature: f32,
pub max_tokens: Option<usize>,
pub max_iterations: usize,
pub max_context_messages: usize,
pub tool_timeout_secs: u64,
pub tools_enabled: bool,
}Fields§
§name: String§system_prompt: String§model: String§temperature: f32§max_tokens: Option<usize>§max_iterations: usize§max_context_messages: usize§tool_timeout_secs: u64§tools_enabled: boolImplementations§
Source§impl AgentConfig
impl AgentConfig
pub fn new(model: impl Into<String>, system_prompt: impl Into<String>) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_temperature(self, temperature: f32) -> Self
pub fn with_max_tokens(self, max_tokens: usize) -> Self
pub fn with_max_iterations(self, max_iterations: usize) -> Self
pub fn with_max_context_messages(self, max_messages: usize) -> Self
pub fn with_tool_timeout(self, timeout: Duration) -> Self
pub fn with_tools_enabled(self, enabled: bool) -> Self
pub fn tool_timeout(&self) -> Duration
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