forked from neurodock/NeuroDock
Refactored to Core 1.10.0
This includes chages to make less things static in the Core, instead using the Options Singelton instead
This commit is contained in:
@@ -5,6 +5,7 @@ import io.github.classgraph.ClassInfo;
|
||||
import io.github.classgraph.ClassInfoList;
|
||||
import io.github.classgraph.ScanResult;
|
||||
import me.neurodock.core.Core;
|
||||
import me.neurodock.core.Options;
|
||||
import me.neurodock.ollama.OllamaFunctionTool;
|
||||
import me.neurodock.ollama.OllamaFunctionTools;
|
||||
import org.json.JSONObject;
|
||||
@@ -27,13 +28,13 @@ public class GeniusTools {
|
||||
public final String Access_Token;
|
||||
public final String BaseURL = "https://api.genius.com";
|
||||
public final OllamaFunctionTools GeniusTools;
|
||||
public final File CacheFile = new File(Core.DATA_DIR + "/genius_cache.json");
|
||||
public final File CacheFile = new File(Options.getInstance().getDataDir(), "genius_cache.json");
|
||||
public JSONObject CacheData;
|
||||
|
||||
public GeniusTools() {
|
||||
super();
|
||||
try {
|
||||
JSONObject obj = new JSONObject(Files.readString(Path.of(Core.DATA_DIR + "/geniusapi.json")));
|
||||
JSONObject obj = new JSONObject(Files.readString(Path.of(Options.getInstance().getDataDir().getPath(), "geniusapi.json")));
|
||||
this.Client_ID = obj.getString("client_id");
|
||||
this.Client_Secret = obj.getString("client_secret");
|
||||
this.Access_Token = obj.getString("access_token");
|
||||
|
||||
Reference in New Issue
Block a user