ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
foresthub::core::Tool Class Referenceabstract

Base interface for all tools. More...

#include <tools.hpp>

Inheritance diagram for foresthub::core::Tool:
foresthub::core::ExternalTool foresthub::core::WebSearch foresthub::core::ExternalToolBase foresthub::agent::Handoff foresthub::core::FunctionTool

Public Member Functions

virtual std::string ToolName () const =0
 Returns the unique name identifying this tool in the LLM schema.
virtual ToolType GetToolType () const =0
 Returns the type discriminator for safe downcasting via static_pointer_cast.
virtual void ToJson (json &j) const =0
 Serialize this tool to JSON.
virtual bool IsExternal () const
 Check if this tool is an ExternalTool (enables static_pointer_cast<ExternalTool>).

Detailed Description

Base interface for all tools.

Member Function Documentation

◆ IsExternal()

virtual bool foresthub::core::Tool::IsExternal ( ) const
inlinevirtual

Check if this tool is an ExternalTool (enables static_pointer_cast<ExternalTool>).

Returns
True for ExternalTool subclasses, false otherwise.

Reimplemented in foresthub::core::ExternalTool.

◆ ToJson()

virtual void foresthub::core::Tool::ToJson ( json & j) const
pure virtual

Serialize this tool to JSON.

Parameters
jOutput JSON object, populated by the method.

Implemented in foresthub::core::ExternalToolBase, and foresthub::core::WebSearch.


The documentation for this class was generated from the following file: