pub struct AgentDefinition {
pub id: String,
pub model: String,
pub instructions: String,
pub tools: Vec<Tool>,
pub max_steps: usize,
pub max_retries: usize,
pub retry_backoff: Duration,
pub human_review: Option<HumanReviewer>,
}Fields§
§id: String§model: String§instructions: String§tools: Vec<Tool>§max_steps: usize§max_retries: usize§retry_backoff: Duration§human_review: Option<HumanReviewer>Implementations§
Source§impl AgentDefinition
impl AgentDefinition
pub fn new(id: impl Into<String>, model: impl Into<String>) -> Self
pub fn instructions(self, instructions: impl Into<String>) -> Self
pub fn tool(self, tool: Tool) -> Self
pub fn max_steps(self, max_steps: usize) -> Self
pub fn model_retries(self, max_retries: usize, backoff: Duration) -> Self
pub fn human_review<F>(self, reviewer: F) -> Self
Trait Implementations§
Source§impl Clone for AgentDefinition
impl Clone for AgentDefinition
Source§fn clone(&self) -> AgentDefinition
fn clone(&self) -> AgentDefinition
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 !RefUnwindSafe for AgentDefinition
impl !UnwindSafe for AgentDefinition
impl Freeze for AgentDefinition
impl Send for AgentDefinition
impl Sync for AgentDefinition
impl Unpin for AgentDefinition
impl UnsafeUnpin for AgentDefinition
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