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 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
Source§impl Tool for ThinkTool
impl Tool for ThinkTool
Source§type Error = ThinkError
type Error = ThinkError
The error type of the tool.
Source§async fn definition(&self, _prompt: String) -> ToolDefinition
async fn definition(&self, _prompt: String) -> ToolDefinition
A method returning the tool definition. The user prompt can be used to
tailor the definition to the specific use case.
Auto Trait Implementations§
impl Freeze for ThinkTool
impl RefUnwindSafe for ThinkTool
impl Send for ThinkTool
impl Sync for ThinkTool
impl Unpin 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