pub struct WebFetchTool { /* private fields */ }Expand description
Tool for fetching web content.
- HTML is converted to markdown
- JSON is pretty-printed
- Other content returned as-is
Implementations§
Source§impl WebFetchTool
impl WebFetchTool
Sourcepub fn with_client(client: Client) -> Self
pub fn with_client(client: Client) -> Self
Creates a webfetch tool with a custom client.
Trait Implementations§
Source§impl Clone for WebFetchTool
impl Clone for WebFetchTool
Source§fn clone(&self) -> WebFetchTool
fn clone(&self) -> WebFetchTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebFetchTool
impl Debug for WebFetchTool
Source§impl Default for WebFetchTool
impl Default for WebFetchTool
Source§impl Tool for WebFetchTool
impl Tool for WebFetchTool
Source§const NAME: &'static str = tool_names::WEBFETCH
const NAME: &'static str = tool_names::WEBFETCH
The name of the tool. This name should be unique.
Source§type Args = WebFetchArgs
type Args = WebFetchArgs
The arguments type of the tool.
Source§type Output = ToolOutput
type Output = ToolOutput
The output 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 WebFetchTool
impl !RefUnwindSafe for WebFetchTool
impl Send for WebFetchTool
impl Sync for WebFetchTool
impl Unpin for WebFetchTool
impl !UnwindSafe for WebFetchTool
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