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

ExternalTool with a C++ callback for execution. More...

#include <tools.hpp>

Inheritance diagram for foresthub::core::FunctionTool:
foresthub::core::ExternalToolBase foresthub::core::ExternalTool foresthub::core::Tool

Public Member Functions

ToolType GetToolType () const override
 Identifies this tool as a user-defined function.
Public Member Functions inherited from foresthub::core::ExternalToolBase
std::string ToolName () const override
 Returns the stored name field.
std::string ToolDescription () const override
 Returns the stored description field.
const json & ToolParameters () const override
 Returns the stored parameters field.
void ToJson (json &j) const override
 Serialize external tool definition to JSON.
Public Member Functions inherited from foresthub::core::ExternalTool
bool IsExternal () const override
 Always returns true — this type is an ExternalTool.

Public Attributes

std::function< json(const std::string &)> tool_call
 Callback invoked with raw JSON arguments; returns a json value used as ToolResult::output.
Public Attributes inherited from foresthub::core::ExternalToolBase
std::string name
 Tool name sent to the LLM.
std::string description
 Human-readable description sent to the LLM.
json parameters
 JSON schema defining expected parameters.

Detailed Description

ExternalTool with a C++ callback for execution.


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