Tool that fetches and returns the plain-text content of any web page.
More...
#include <fetch_webpage_tool.h>
Tool that fetches and returns the plain-text content of any web page.
◆ addParameter()
| void agents::Tool::addParameter |
( |
const Parameter & | param | ) |
|
|
inherited |
Add a parameter to the tool.
- Parameters
-
| param | The parameter to add |
◆ addParametersFromJson()
| void agents::Tool::addParametersFromJson |
( |
const JsonObject & | params | ) |
|
|
inherited |
Add tool parameters from json definition.
- Parameters
-
| params | The parameters to add |
◆ execute()
◆ getDescription()
| const std::string & agents::Tool::getDescription |
( |
| ) |
const |
|
inherited |
Get the description of the tool.
- Returns
- The description of the tool
◆ getName()
| const std::string & agents::Tool::getName |
( |
| ) |
const |
|
inherited |
Get the name of the tool.
- Returns
- The name of the tool
◆ getParameters()
Get the parameters of the tool.
- Returns
- The parameters of the tool
◆ getSchema()
| const JsonObject & agents::Tool::getSchema |
( |
| ) |
const |
|
inherited |
Get the schema of the tool.
- Returns
- The schema of the tool
◆ scoreRelevance()
| virtual double agents::Tool::scoreRelevance |
( |
const std::string & | query | ) |
const |
|
virtualinherited |
Score the relevance of this tool to a given query.
- Parameters
-
| query | The query to score against |
- Returns
- double Relevance score (0.0 to 1.0)
Reimplemented in agents::skills::MarkdownSkillTool.
◆ setCallback()
Set the execution callback.
- Parameters
-
| callback | The callback to set |
◆ validateParameters()
| bool agents::Tool::validateParameters |
( |
const JsonObject & | params | ) |
const |
|
inherited |
Validate parameters against schema.
- Parameters
-
| params | The parameters to validate |
- Returns
- true of valid, otherwise false