forked from Chat_things/NeuroDock
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user