Class AddArrayMemory
java.lang.Object
me.neurodock.ollama.OllamaFunctionTool
me.neurodock.core.memory.array.AddArrayMemory
- All Implemented Interfaces:
OllamaTool
-
Field Summary
Fields inherited from class OllamaFunctionTool
sourceModifier and TypeFieldDescriptionprotected StringThis field is set via Reflection injection fromOllamaObject.addTool(OllamaTool, String). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull OllamaToolResponsefunction(OllamaFunctionArgument... args) The function of the tool.
This is used by Ollama to call the tool.
ThrowOllamaToolErrorExceptionif the tool encounters an error instead of normal exceptions.@NotNull Stringname()The name of the tool This is used by Ollama to know what the tool is@NotNull OllamaPerameterThe parameters of the tool This is used by Ollama to know what parameters the tool takes If null, the tool does not take any parametersMethods inherited from class OllamaFunctionTool
description, renderCalling, toStringModifier and TypeMethodDescriptionThe description of the tool This is used by Ollama to know what the tool doesrenderCalling(org.json.JSONObject calling) Generates a string representation of this tool calling for rendering.toString()
-
Constructor Details
-
AddArrayMemory
public AddArrayMemory()
-
-
Method Details
-
name
Description copied from class:OllamaFunctionToolThe name of the tool This is used by Ollama to know what the tool is- Specified by:
namein classOllamaFunctionTool- Returns:
- The name of the tool
-
parameters
Description copied from class:OllamaFunctionToolThe parameters of the tool This is used by Ollama to know what parameters the tool takes If null, the tool does not take any parameters- Specified by:
parametersin classOllamaFunctionTool- Returns:
- The parameters of the tool or null if the tool does not take any parameters
-
function
Description copied from class:OllamaFunctionToolThe function of the tool.
This is used by Ollama to call the tool.
ThrowOllamaToolErrorExceptionif the tool encounters an error instead of normal exceptions. TheOllamaToolErrorExceptiongets handled more gracefully byCore.handleResponse(JSONObject)- Specified by:
functionin classOllamaFunctionTool- Parameters:
args- The arguments to pass to the tool, if any- Returns:
- The response from the tool, if null return
OllamaToolResponse
-