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<ThinkTool, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThinkTool, <__D as Deserializer<'de>>::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: <ThinkTool as PortableTool>::Args,
) -> Result<<ThinkTool as PortableTool>::Output, <ThinkTool as PortableTool>::Error>
async fn call( &self, args: <ThinkTool as PortableTool>::Args, ) -> Result<<ThinkTool as PortableTool>::Output, <ThinkTool as PortableTool>::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.
Source§impl Serialize for ThinkTool
impl Serialize for ThinkTool
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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> 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.
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tool for Twhere
T: PortableTool,
impl<T> Tool for Twhere
T: PortableTool,
Source§const NAME: &'static str = const NAME: &'static str = <T as rig_core::tool::PortableTool>::NAME;
const NAME: &'static str = const NAME: &'static str = <T as rig_core::tool::PortableTool>::NAME;
Unique registration and provider-facing name.
Source§type Args = <T as PortableTool>::Args
type Args = <T as PortableTool>::Args
Typed JSON arguments.
Source§type Output = <T as PortableTool>::Output
type Output = <T as PortableTool>::Output
Output convertible into Rig’s canonical model presentation. Read more
Source§type Error = <T as PortableTool>::Error
type Error = <T as PortableTool>::Error
Typed error returned by direct calls to this tool. Read more
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.