Slight chages

Display
> Set both tools to INTERNAL

GetMemoryFunction
> Made so it gives a JSON

PythonRunner
> Fixed some value checkes
This commit is contained in:
2025-03-14 20:01:38 +01:00
parent 907f2e42e5
commit 01de196d82
3 changed files with 99 additions and 20 deletions

View File

@@ -4,6 +4,8 @@ import me.zacharias.chat.ollama.OllamaFunctionArgument;
import me.zacharias.chat.ollama.OllamaFunctionTool;
import me.zacharias.chat.ollama.OllamaPerameter;
import me.zacharias.chat.ollama.OllamaToolRespnce;
import org.json.JSONArray;
import org.json.JSONObject;
/**
* Provides the get_memory function.<br>
@@ -32,6 +34,6 @@ public class GetMemoryFunction extends OllamaFunctionTool {
@Override
public OllamaToolRespnce function(OllamaFunctionArgument... args) {
return new OllamaToolRespnce(name(), memory.getMemory().toString());
return new OllamaToolRespnce(name(), new JSONObject().put("memory_items", new JSONArray(memory.getMemory())).toString());
}
}