pub fn web_fetch_tool(
config: WebFetchConfig,
summarizer: Option<Arc<dyn Model>>,
) -> Result<FunctionTool>Expand description
Builds the web_fetch tool.
summarizer is the model that answers the prompt over the fetched page; the harness passes
the one it resolved from config.model and the main model. When it
is None, a model instance or router in config.model is used, and otherwise the calling
agent’s aux_model (the agent’s model unless one is set):
this model > agent.aux_model > agent.model.
use strands::Tool;
use strands_harness::tools::web_fetch::{WebFetchConfig, web_fetch_tool};
let tool = web_fetch_tool(WebFetchConfig::default(), None)?;
assert_eq!(tool.name(), "web_fetch");§Errors
When the HTTP client for the direct transport cannot be built.