pub struct AgentAsToolOptions {
pub name: Option<String>,
pub description: Option<String>,
pub preserve_context: Option<bool>,
pub delegate: Option<bool>,
}Expand description
Options for Agent::as_tool (AgentAsToolOptions).
Fields§
§name: Option<String>The tool name. Defaults to the agent’s name, which must then be a valid tool name
(letters, digits, - and _): name the agent with .name("researcher"), or set this. The
default Strands Agent is not a valid tool name.
description: Option<String>The tool description. Defaults to the agent’s description, then
Use the <name> agent by providing a natural language input.
preserve_context: Option<bool>Keep the agent’s conversation across calls. Defaults to false: each call starts from the
state the agent had when it became a tool.
delegate: Option<bool>Return the agent’s answer directly to the user as the final answer (delegate). The
description says so to the model.
Implementations§
Source§impl AgentAsToolOptions
impl AgentAsToolOptions
Sourcepub fn builder() -> AgentAsToolOptionsBuilder
pub fn builder() -> AgentAsToolOptionsBuilder
Create an instance of AgentAsToolOptions using the builder syntax
Trait Implementations§
Source§impl Clone for AgentAsToolOptions
impl Clone for AgentAsToolOptions
Source§impl Debug for AgentAsToolOptions
impl Debug for AgentAsToolOptions
Source§impl Default for AgentAsToolOptions
impl Default for AgentAsToolOptions
impl Eq for AgentAsToolOptions
Source§impl PartialEq for AgentAsToolOptions
impl PartialEq for AgentAsToolOptions
impl StructuralPartialEq for AgentAsToolOptions
Auto Trait Implementations§
impl Freeze for AgentAsToolOptions
impl RefUnwindSafe for AgentAsToolOptions
impl Send for AgentAsToolOptions
impl Sync for AgentAsToolOptions
impl Unpin for AgentAsToolOptions
impl UnsafeUnpin for AgentAsToolOptions
impl UnwindSafe for AgentAsToolOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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.