pub struct Agent { /* private fields */ }Implementations§
Source§impl Agent
impl Agent
pub fn builder(name: impl Into<String>) -> AgentBuilder
pub fn name(&self) -> &str
pub fn instructions(&self) -> &str
pub fn model(&self) -> Option<&ModelRef>
pub fn model_settings(&self) -> &ModelSettings
pub fn tools(&self) -> &[Arc<dyn Tool>]
pub fn handoffs(&self) -> &[Handoff]
pub fn hooks(&self) -> &[Arc<dyn RuntimeHook>]
pub fn max_cycles(&self) -> Option<u32>
pub fn tool_use_behavior(&self) -> &ToolUseBehavior
pub fn tool_policy(&self) -> &ToolPolicy
pub fn metadata(&self) -> &Metadata
pub fn as_tool(&self) -> AgentToolBuilder
pub fn as_background_task(&self) -> BackgroundAgentTaskBuilder
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Agent
impl !UnwindSafe for Agent
impl Freeze for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
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 moreCreates a shared type from an unshared type.