pub struct WebFetchTool { /* private fields */ }Expand description
Built-in SSRF-guarded HTTP/HTML fetch tool.
Implementations§
Source§impl WebFetchTool
impl WebFetchTool
Sourcepub fn new(config: WebFetchConfig) -> Self
pub fn new(config: WebFetchConfig) -> Self
Creates a web_fetch tool with the supplied configuration.
Sourcepub fn into_registered_tool(self) -> Result<RegisteredTool, ToolBuildError>
pub fn into_registered_tool(self) -> Result<RegisteredTool, ToolBuildError>
Converts this tool into a registered runtime tool.
Trait Implementations§
Source§impl Clone for WebFetchTool
impl Clone for WebFetchTool
Source§impl Debug for WebFetchTool
impl Debug for WebFetchTool
Source§impl Default for WebFetchTool
impl Default for WebFetchTool
Source§impl ToolExecutor for WebFetchTool
impl ToolExecutor for WebFetchTool
Source§fn execute<'a>(
&'a self,
call: PendingToolCall,
context: ToolExecutionContext,
) -> ToolExecutorFuture<'a>
fn execute<'a>( &'a self, call: PendingToolCall, context: ToolExecutionContext, ) -> ToolExecutorFuture<'a>
Executes one pending model-requested tool call. Read more
Source§fn propose<'a>(
&'a self,
_call: PendingToolCall,
_context: ToolExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<ToolActionPreflight, ToolExecutionError>> + Send + 'a>>
fn propose<'a>( &'a self, _call: PendingToolCall, _context: ToolExecutionContext, ) -> Pin<Box<dyn Future<Output = Result<ToolActionPreflight, ToolExecutionError>> + Send + 'a>>
Builds read-only deterministic evidence for a proposed action. Read more
Auto Trait Implementations§
impl Forget for WebFetchTool
impl Freeze for WebFetchToolwhere
*const ArcInner<WebFetchConfig> is !null: Freeze,
PhantomData<ArcInner<WebFetchConfig>>: Freeze,
impl Move for WebFetchTool
impl RefUnwindSafe for WebFetchToolwhere
Atomic<usize>: RefUnwindSafe,
RwLock<Arc<LivePolicyBaseline>>: RefUnwindSafe,
RwLock<ProcessSessionPermissionState>: RefUnwindSafe,
impl Send for WebFetchTool
impl Sync for WebFetchTool
impl Unpin for WebFetchTool
impl UnsafeUnpin for WebFetchToolwhere
*const ArcInner<WebFetchConfig> is !null: UnsafeUnpin,
PhantomData<ArcInner<WebFetchConfig>>: UnsafeUnpin,
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