pub struct WebFetchToolEnhanced { /* private fields */ }Available on crate feature
media only.Expand description
Enhanced web fetch tool with image download support
Can fetch web pages and download images as base64.
Implementations§
Source§impl WebFetchToolEnhanced
impl WebFetchToolEnhanced
Sourcepub fn new() -> WebFetchToolEnhanced
pub fn new() -> WebFetchToolEnhanced
Create a new enhanced web fetch tool
Sourcepub fn with_max_content_length(self, n: usize) -> WebFetchToolEnhanced
pub fn with_max_content_length(self, n: usize) -> WebFetchToolEnhanced
Set maximum content length for text responses
Sourcepub fn with_text_width(self, width: usize) -> WebFetchToolEnhanced
pub fn with_text_width(self, width: usize) -> WebFetchToolEnhanced
Set HTML to text conversion line width
Sourcepub fn with_timeout(self, secs: u64) -> WebFetchToolEnhanced
pub fn with_timeout(self, secs: u64) -> WebFetchToolEnhanced
Set timeout in seconds
Trait Implementations§
Source§impl Default for WebFetchToolEnhanced
impl Default for WebFetchToolEnhanced
Source§fn default() -> WebFetchToolEnhanced
fn default() -> WebFetchToolEnhanced
Returns the “default value” for a type. Read more
Source§impl Tool for WebFetchToolEnhanced
impl Tool for WebFetchToolEnhanced
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable tool description.
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema describing accepted parameters.
Source§fn execute(
&self,
parameters: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, ReactError>> + Send + '_>>
fn execute( &self, parameters: HashMap<String, Value>, ) -> Pin<Box<dyn Future<Output = Result<ToolResult, ReactError>> + Send + '_>>
Execute the tool with untyped JSON parameters.
Source§fn validate_parameters(
&self,
_params: &HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<(), ReactError>> + Send + '_>>
fn validate_parameters( &self, _params: &HashMap<String, Value>, ) -> Pin<Box<dyn Future<Output = Result<(), ReactError>> + Send + '_>>
Validate parameters before execution.
Source§fn permissions(&self) -> Vec<ToolPermission>
fn permissions(&self) -> Vec<ToolPermission>
Permissions required to invoke this tool.
Source§fn risk_level(&self) -> ToolRiskLevel
fn risk_level(&self) -> ToolRiskLevel
Risk level of this tool. Dangerous tools require explicit approval.
Auto Trait Implementations§
impl Freeze for WebFetchToolEnhanced
impl !RefUnwindSafe for WebFetchToolEnhanced
impl Send for WebFetchToolEnhanced
impl Sync for WebFetchToolEnhanced
impl Unpin for WebFetchToolEnhanced
impl UnsafeUnpin for WebFetchToolEnhanced
impl !UnwindSafe for WebFetchToolEnhanced
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request