Agents 0.0.2
Edge AI Agents SDK
Loading...
Searching...
No Matches
agents::tools::MediaLoaderTool Class Reference

Media loader tool that loads media from URLs and returns them as base64 encoded data URLs. More...

#include <media_loader_tool.h>

Inheritance diagram for agents::tools::MediaLoaderTool:
agents::Tool

Public Member Functions

 MediaLoaderTool (std::shared_ptr< LLMInterface > llm)
 Construct a new Image Loader Tool object.
 
ToolResult execute (const JsonObject &params) const override
 Execute the Image Loader Tool.
 
const StringgetName () const
 Get the name of the tool.
 
const StringgetDescription () const
 Get the description of the tool.
 
const ParameterMapgetParameters () const
 Get the parameters of the tool.
 
const JsonObjectgetSchema () const
 Get the schema of the tool.
 
void addParameter (const Parameter &param)
 Add a parameter to the tool.
 
void setCallback (ToolCallback callback)
 Set the execution callback.
 
bool validateParameters (const JsonObject &params) const
 Validate parameters against schema.
 

Detailed Description

Media loader tool that loads media from URLs and returns them as base64 encoded data URLs.

Constructor & Destructor Documentation

◆ MediaLoaderTool()

agents::tools::MediaLoaderTool::MediaLoaderTool ( std::shared_ptr< LLMInterface > llm)

Construct a new Image Loader Tool object.

Parameters
llmThe LLM interface to use

Member Function Documentation

◆ addParameter()

void agents::Tool::addParameter ( const Parameter & param)
inherited

Add a parameter to the tool.

Parameters
paramThe parameter to add

◆ execute()

ToolResult agents::tools::MediaLoaderTool::execute ( const JsonObject & params) const
overridevirtual

Execute the Image Loader Tool.

Parameters
paramsThe parameters for the Image Loader Tool
Returns
ToolResult The result of the Image Loader Tool

Reimplemented from agents::Tool.

◆ getDescription()

const String & agents::Tool::getDescription ( ) const
inherited

Get the description of the tool.

Returns
The description of the tool

◆ getName()

const String & agents::Tool::getName ( ) const
inherited

Get the name of the tool.

Returns
The name of the tool

◆ getParameters()

const ParameterMap & agents::Tool::getParameters ( ) const
inherited

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

◆ setCallback()

void agents::Tool::setCallback ( ToolCallback callback)
inherited

Set the execution callback.

Parameters
callbackThe callback to set

◆ validateParameters()

bool agents::Tool::validateParameters ( const JsonObject & params) const
inherited

Validate parameters against schema.

Parameters
paramsThe parameters to validate
Returns
true of valid, otherwise false