pub struct ThinkTool;Expand description
The Think tool allows agents to stop and think in complex tool use situations.
This tool provides a dedicated space for structured thinking during complex tasks, particularly when processing external information (e.g., tool call results). It doesn’t actually perform any actions or retrieve any information - it just provides a space for the model to reason through complex problems.
This tool is original derived from the Think tool blog post from Anthropic.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ThinkTool
impl<'de> Deserialize<'de> for ThinkTool
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PortableTool for ThinkTool
impl PortableTool for ThinkTool
Source§type Error = ThinkError
type Error = ThinkError
Concrete author-facing failure.
Source§fn description(&self) -> String
fn description(&self) -> String
Model-facing description.
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema for arguments.
Source§async fn call(&self, args: Self::Args) -> Result<Self::Output, Self::Error>
async fn call(&self, args: Self::Args) -> Result<Self::Output, Self::Error>
Execute one owned invocation without runtime access.
Source§fn map_error(&self, error: Self::Error) -> ToolExecutionError
fn map_error(&self, error: Self::Error) -> ToolExecutionError
Normalize a concrete failure at the runtime effect boundary.
Auto Trait Implementations§
impl Freeze for ThinkTool
impl RefUnwindSafe for ThinkTool
impl Send for ThinkTool
impl Sync for ThinkTool
impl Unpin for ThinkTool
impl UnsafeUnpin for ThinkTool
impl UnwindSafe for ThinkTool
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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 moreSource§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.