pub struct AgentConfig {
pub system_prompt_override: Option<String>,
pub context_prefix: Option<String>,
pub model_override: Option<String>,
pub temperature_override: Option<f32>,
pub additional_tools: Vec<String>,
pub excluded_tools: Vec<String>,
pub session_id: Option<String>,
pub user_id: Option<String>,
pub metadata: HashMap<String, String>,
}Expand description
Runtime configuration for agent creation
Fields§
§system_prompt_override: Option<String>Override system prompt
context_prefix: Option<String>Additional context to prepend
model_override: Option<String>Override model
temperature_override: Option<f32>Override temperature
additional_tools: Vec<String>Additional tools to include
excluded_tools: Vec<String>Tools to exclude
session_id: Option<String>Session/user ID for tracking
user_id: Option<String>User ID for tracking
metadata: HashMap<String, String>Custom metadata
Implementations§
Source§impl AgentConfig
impl AgentConfig
pub fn new() -> Self
pub fn override_system_prompt(self, prompt: impl Into<String>) -> Self
pub fn context_prefix(self, prefix: impl Into<String>) -> Self
pub fn override_model(self, model: impl Into<String>) -> Self
pub fn override_temperature(self, temp: f32) -> Self
pub fn add_tool(self, tool: impl Into<String>) -> Self
pub fn exclude_tool(self, tool: impl Into<String>) -> Self
pub fn session_id(self, id: impl Into<String>) -> Self
pub fn user_id(self, id: impl Into<String>) -> Self
pub fn metadata(self, key: impl Into<String>, value: impl Into<String>) -> 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 · 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§fn default() -> AgentConfig
fn default() -> AgentConfig
Returns the “default value” for a type. 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more