forked from neurodock/NeuroDock
refactor: redesign plugin system and enhance message handling
- Move plugin and tool-related classes to a dedicated `Plugin-API` module. - Introduce a new plugin lifecycle (`onInit`, `onEnable`, `onDisable`) and a more robust `Tool` API. - Refactor `Core` to use `PrintAdvanceMessageHandler` for improved handling of assistant messages, tool responses, and errors. - Rename `PluginLoader` to `Loader` and migrate it to `me.zacharias.chat.plugin.loader`. - Update build configurations and Java toolchains across modules. - Clean up obsolete plugin annotations and interfaces in the `Core` module.
This commit is contained in:
@@ -6,6 +6,7 @@ import me.zacharias.chat.ollama.OllamaPerameter;
|
||||
import me.zacharias.chat.ollama.OllamaToolRespnce;
|
||||
import me.zacharias.chat.plugin.annotation.OllamaTool;
|
||||
import me.zacharias.chat.plugin.annotation.injectons.InjectPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@OllamaTool
|
||||
public class Tool extends OllamaFunctionTool {
|
||||
@@ -13,7 +14,7 @@ public class Tool extends OllamaFunctionTool {
|
||||
Test core;
|
||||
|
||||
@Override
|
||||
public String name() {
|
||||
public @NotNull String name() {
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -23,7 +24,7 @@ public class Tool extends OllamaFunctionTool {
|
||||
}
|
||||
|
||||
@Override
|
||||
public OllamaPerameter parameters() {
|
||||
public @NotNull OllamaPerameter parameters() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user