nxt::ai::tools::function_tool struct

Local executable function tool plus its JSON schema.

Public variables

std::string name
Name exposed to the model.
std::string description
Human-readable description exposed to the model.
nlohmann::json parameters
JSON schema for arguments.
bool strict
Whether the model must conform strictly to parameters.
std::function<nxt::task<std::string>(const nlohmann::json&)> run
Coroutine called with parsed arguments to produce tool output text.