Whonestly, i have forgoten what this contains, sooo ye :)

Removed Ollama integration
swaped it for llama.cpp integration
and made backend integration more generic/abstract.. soo ollama will return.. maybe.. probobly

some mopdules(GeniusAPI) dosent work due to not being ported yet.... and maybe will never be
This commit is contained in:
2026-08-29 23:52:02 +02:00
parent 209bde75e1
commit 2949a0d2fe
51 changed files with 1659 additions and 2325 deletions
@@ -1,8 +1,8 @@
package me.neurodock.genius;
import me.neurodock.ollama.OllamaFunctionTool;
import me.neurodock.llm.tools.FunctionTool;
public abstract class GeniusEndpointTool extends OllamaFunctionTool {
public abstract class GeniusEndpointTool extends FunctionTool {
protected GeniusTools geniusToolsInstance;
public GeniusEndpointTool(GeniusTools geniusTools) {
@@ -1,12 +1,11 @@
package me.neurodock.genius.endpoints;
import me.neurodock.ollama.OllamaFunctionArgument;
import me.neurodock.ollama.OllamaPerameter;
import me.neurodock.ollama.OllamaToolResponse;
import me.neurodock.ollama.exceptions.OllamaToolErrorException;
import me.neurodock.genius.GeniusEndpoint;
import me.neurodock.genius.GeniusEndpointTool;
import me.neurodock.genius.GeniusTools;
import me.neurodock.llm.tools.ToolArguments;
import me.neurodock.llm.tools.ToolParameters;
import me.neurodock.llm.tools.ToolResponse;
import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
import org.jsoup.Jsoup;
@@ -49,20 +48,16 @@ public class GetLyrics extends GeniusEndpointTool {
}
@Override
public @NotNull OllamaPerameter parameters() {
return OllamaPerameter.builder()
.addProperty("song_id", OllamaPerameter.OllamaPerameterBuilder.Type.INT, "The ID of the song to get lyrics for.", true)
public @NotNull ToolParameters parameters() {
return ToolParameters.builder()
.addProperty("song_id", ToolParameters.ToolParametersBuilder.Type.INT, "The ID of the song to get lyrics for.", true)
.build();
}
@Override
public @NotNull OllamaToolResponse function(OllamaFunctionArgument... args) {
public @NotNull ToolResponse function(ToolArguments args) {
if(!( args[0].value() instanceof Integer)) {
throw new OllamaToolErrorException(this.name(), "The song_id must be an integer.");
}
String lyricsStr = geniusToolsInstance.hasCache((int) args[0].value());
String lyricsStr = geniusToolsInstance.hasCache(args.getArgument("song_id", Integer.class));
if(lyricsStr != null)
{