pub struct DuckDuckGoSearchTool { /* private fields */ }Expand description
DuckDuckGo web search tool
Searches using DuckDuckGo’s Instant Answer API, no API key required.
Implementations§
Trait Implementations§
Source§impl BaseTool for DuckDuckGoSearchTool
impl BaseTool for DuckDuckGoSearchTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns the tool description. Read more
Source§fn run<'life0, 'async_trait>(
&'life0 self,
input: String,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
input: String,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool (string version). Read more
Source§fn return_direct(&self) -> bool
fn return_direct(&self) -> bool
Whether to return result directly to user. Read more
Source§fn risk(&self) -> ToolRiskProfile
fn risk(&self) -> ToolRiskProfile
Declared Rule-of-Two risk profile (A2, v0.22.1). Read more
Source§impl Default for DuckDuckGoSearchTool
impl Default for DuckDuckGoSearchTool
Source§impl Tool for DuckDuckGoSearchTool
impl Tool for DuckDuckGoSearchTool
Source§type Input = SearchInput
type Input = SearchInput
Input type (must support deserialization and JSON Schema).
Source§type Output = SearchOutput
type Output = SearchOutput
Output type (must support serialization).
Source§fn invoke<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
input: Self::Input,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool. Read more
Source§fn args_schema(&self) -> Option<Value>
fn args_schema(&self) -> Option<Value>
Returns the input JSON Schema.
Auto Trait Implementations§
impl !RefUnwindSafe for DuckDuckGoSearchTool
impl !UnwindSafe for DuckDuckGoSearchTool
impl Freeze for DuckDuckGoSearchTool
impl Send for DuckDuckGoSearchTool
impl Sync for DuckDuckGoSearchTool
impl Unpin for DuckDuckGoSearchTool
impl UnsafeUnpin for DuckDuckGoSearchTool
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