Making sure that Core.RPCP and plugin.tool.Tool.RPCP_SOURCE have the same

Updated Display to wait for Ollama to return before continuing
Updated GeniusTools.java to reflect correctly after "The Great Refector"
Temporarly comented out things from API after making Ollama be more threaded pending correction and expantion
This commit is contained in:
2026-07-19 22:05:09 +02:00
parent fc8a06bde5
commit 2defa32cb8
6 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" /> <file type="web" url="file://$PROJECT_DIR$" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_25" default="true" project-jdk-name="25" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_26" default="true" project-jdk-name="26" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>
@@ -28,7 +28,7 @@ public class Message {
} }
Thread t = new Thread(() -> { Thread t = new Thread(() -> {
apiApplication.getCore().getOllamaObject().addMessage(new OllamaMessage(OllamaMessageRole.USER, query)); apiApplication.getCore().getOllamaObject().addMessage(new OllamaMessage(OllamaMessageRole.USER, query));
apiApplication.getCore().handleResponse(apiApplication.getCore().qurryOllama()); //apiApplication.getCore().handleResponse(apiApplication.getCore().qurryOllama());
}); });
t.start(); t.start();
return ResponseEntity.ok("Query received"); return ResponseEntity.ok("Query received");
@@ -33,6 +33,7 @@ import java.util.jar.JarFile;
import static me.neurodock.ollama.OllamaFunctionArgument.deconstructOllamaFunctionArguments; import static me.neurodock.ollama.OllamaFunctionArgument.deconstructOllamaFunctionArguments;
import static me.neurodock.plugin.Plugin.UNKNOWN_PLUGIN; import static me.neurodock.plugin.Plugin.UNKNOWN_PLUGIN;
import static me.neurodock.plugin.tool.Tool.RPCP_SOURCE;
/** /**
* The Main class for the System, responsible for managing the OllamaObject, tools, and the Ollama API. * The Main class for the System, responsible for managing the OllamaObject, tools, and the Ollama API.
@@ -943,7 +944,7 @@ public class Core {
/** /**
* Runtime Pre-Compiled Plugins: external plugins loaded at runtime via Plugin-API. * Runtime Pre-Compiled Plugins: external plugins loaded at runtime via Plugin-API.
*/ */
public static final String RPCP = "RPCP"; public static final String RPCP = RPCP_SOURCE;
/** /**
* Tools defined via the RESt API interface dynamically. * Tools defined via the RESt API interface dynamically.
@@ -5,6 +5,7 @@ import me.neurodock.core.Pair;
import me.neurodock.core.PrintMessageHandler; import me.neurodock.core.PrintMessageHandler;
import me.neurodock.core.files.FileHandlerLocation; import me.neurodock.core.files.FileHandlerLocation;
import me.neurodock.core.memory.CoreMemory; import me.neurodock.core.memory.CoreMemory;
import me.neurodock.genius.GeniusTools;
import me.neurodock.ollama.*; import me.neurodock.ollama.*;
import me.neurodock.ollama.utils.SystemMessage; import me.neurodock.ollama.utils.SystemMessage;
import org.json.JSONObject; import org.json.JSONObject;
@@ -169,7 +170,7 @@ public class Display {
writeLog("User: " + message); writeLog("User: " + message);
core.getOllamaObject().addMessage(new OllamaMessage(OllamaMessageRole.USER, message.toString())); core.getOllamaObject().addMessage(new OllamaMessage(OllamaMessageRole.USER, message.toString()));
//System.out.println(ollamaObject.toString()); //System.out.println(ollamaObject.toString());
core.qurryOllama().thenAccept(core::handleResponse); core.qurryOllama().thenAccept(core::handleResponse).join();
} }
} }
} catch (Exception e) { } catch (Exception e) {
@@ -66,7 +66,7 @@ public class GeniusTools {
OllamaFunctionTools.OllamaFunctionToolsBuilder builder = new OllamaFunctionTools.OllamaFunctionToolsBuilder(); OllamaFunctionTools.OllamaFunctionToolsBuilder builder = new OllamaFunctionTools.OllamaFunctionToolsBuilder();
try(ScanResult scanResult = new ClassGraph().enableAllInfo().acceptPackages("me.zacharias.neuro.dock.genius.endpoints").scan()) { try(ScanResult scanResult = new ClassGraph().enableAllInfo().acceptPackages("me.neurodock.genius.endpoints").scan()) {
ClassInfoList endpoints = scanResult.getClassesWithAnnotation(GeniusEndpoint.class.getName()); ClassInfoList endpoints = scanResult.getClassesWithAnnotation(GeniusEndpoint.class.getName());
for (ClassInfo classInfo : endpoints) { for (ClassInfo classInfo : endpoints) {
Class<?> clazz = classInfo.loadClass(); Class<?> clazz = classInfo.loadClass();
@@ -9,6 +9,7 @@ public abstract class Tool {
/** /**
* Magic constant for RPCP sources.<br> * Magic constant for RPCP sources.<br>
* This is solely here to replace the case of a magic string being used in the code * This is solely here to replace the case of a magic string being used in the code
* And is the same as Sources.RPCP from NeuroDock::Core
*/ */
public static final String RPCP_SOURCE = "RPCP"; public static final String RPCP_SOURCE = "RPCP";