pub struct AgentBuilder { /* private fields */ }Implementations§
Source§impl AgentBuilder
impl AgentBuilder
pub fn instructions(self, instructions: impl Into<String>) -> Self
pub fn model(self, model: ModelRef) -> Self
pub fn model_settings(self, settings: ModelSettings) -> Self
pub fn tool(self, tool: impl Tool + 'static) -> Self
pub fn tool_arc(self, tool: Arc<dyn Tool>) -> Self
pub fn handoff(self, handoff: impl Into<Handoff>) -> Self
pub fn input_guardrail(self, guardrail: Arc<dyn InputGuardrail>) -> Self
pub fn output_guardrail(self, guardrail: Arc<dyn OutputGuardrail>) -> Self
pub fn hook(self, hook: Arc<dyn RuntimeHook>) -> Self
pub fn max_cycles(self, max_cycles: u32) -> Self
pub fn tool_use_behavior(self, behavior: ToolUseBehavior) -> Self
pub fn tool_policy(self, tool_policy: ToolPolicy) -> Self
pub fn metadata(self, key: impl Into<String>, value: Value) -> Self
pub fn build(self) -> Result<Agent, String>
Auto Trait Implementations§
impl !RefUnwindSafe for AgentBuilder
impl !UnwindSafe for AgentBuilder
impl Freeze for AgentBuilder
impl Send for AgentBuilder
impl Sync for AgentBuilder
impl Unpin for AgentBuilder
impl UnsafeUnpin for AgentBuilder
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> 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.