Class FunctionTool
java.lang.Object
me.neurodock.llm.tools.FunctionTool
- All Implemented Interfaces:
Tool
- Direct Known Subclasses:
AddArrayMemory, AddMemoryFunction, GetArrayedMemories, GetArrayMemory, GetMemoriesFunction, GetMemoryFunction, GetMemoryIdentitiesFunction, ReadFileTool, RemoveMemoryFunction, WriteFileTool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe description of the tool.abstract @NotNull ToolResponsefunction(ToolArguments args) Invokes the tool.abstract @NotNull Stringname()The name of the tool.abstract @NotNull ToolParametersThe parameters this tool accepts.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Tool
renderCalling
-
Constructor Details
-
FunctionTool
public FunctionTool()
-
-
Method Details
-
name
-
description
The description of the tool. Used by the model to understand what the tool does. May benullto omit it from the serialized JSON.- Returns:
- the tool's description, or
null
-
parameters
The parameters this tool accepts.- Returns:
- the tool's parameter schema
-
function
Invokes the tool.- Parameters:
args- the arguments passed by the model- Returns:
- the tool's response
- Throws:
ToolException- if the tool encounters an error
-