forked from neurodock/NeuroDock
refactor(Core): decompose handleResponse and add ToolCallingRender system
- Extract handleResponse into focused helpers: processToolCall, findTool, reportToolNotFound, renderToolCalling, executeToolCall - Introduce ToolCallingRender sealed interface (Suppress/Default/Custom) allowing tools to control how their invocations are rendered - Add printToolCalling to PrintAdvanceMessageHandler contract - Implement default tool calling rendering in PrintMessageHandler (blue text) - Add WriteFileTool for file writing capabilities - Fix "responce" → "response" typo across Java and Python files - Improve PythonRunner docker error handling and output messages - Update Gradle test configuration (maxHeapSize, test logging) Signed-off-by: zacharias <alienfromdia@proton.me>
This commit is contained in:
@@ -5,11 +5,8 @@ import me.neurodock.core.Pair;
|
||||
import me.neurodock.core.PrintMessageHandler;
|
||||
import me.neurodock.core.files.FileHandlerLocation;
|
||||
import me.neurodock.core.memory.CoreMemory;
|
||||
import me.neurodock.mal.api.MALAPITool;
|
||||
import me.neurodock.ollama.*;
|
||||
import me.neurodock.ollama.utils.SystemMessage;
|
||||
import me.neurodock.genius.GeniusTools;
|
||||
import me.neurodock.wikipedia.WikipediaTool;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.*;
|
||||
@@ -172,7 +169,7 @@ public class Display {
|
||||
writeLog("User: " + message);
|
||||
core.getOllamaObject().addMessage(new OllamaMessage(OllamaMessageRole.USER, message.toString()));
|
||||
//System.out.println(ollamaObject.toString());
|
||||
core.handleResponce(core.qurryOllama());
|
||||
core.handleResponse(core.qurryOllama());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user