Moved versions of the "public facing" modules to the gradle.properties

Core:
- Fixed my promis of making Core work with multiple OllamaObjects
This commit is contained in:
2026-07-30 21:24:06 +02:00
parent b8280e6ec5
commit 5ae5920478
5 changed files with 26 additions and 30 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ plugins {
id 'io.spring.dependency-management' version '1.1.4' id 'io.spring.dependency-management' version '1.1.4'
} }
version = '1.0-SNAPSHOT' version = APIVersion
dependencies { dependencies {
implementation project(":Core") implementation project(":Core")
+3 -1
View File
@@ -2,11 +2,13 @@ plugins {
id 'java-library' id 'java-library'
} }
version = '1.10.0' version = coreVersion
dependencies { dependencies {
implementation project(":Plugin-API") implementation project(":Plugin-API")
api "org.json:json:20250107" api "org.json:json:20250107"
implementation 'org.graalvm.polyglot:polyglot:25.1.3'
implementation 'org.graalvm.polyglot:js:25.1.3'
} }
java { java {
+16 -26
View File
@@ -326,25 +326,20 @@ public class Core {
* @param ollamaObject The OllamaObject to use * @param ollamaObject The OllamaObject to use
*/ */
public void setOllamaObject(OllamaObject ollamaObject) { public void setOllamaObject(OllamaObject ollamaObject) {
if(this.ollamaObject == null) { this.ollamaObject = ollamaObject;
this.ollamaObject = ollamaObject;
for(Pair<OllamaTool, String> tool : ollamaObject.getTools()) { for(Pair<OllamaTool, String> tool : ollamaObject.getTools()) {
if(tool.getKey() instanceof OllamaFunctionTool functionTool) if(tool.getKey() instanceof OllamaFunctionTool functionTool)
{ {
funtionTools.add(new Pair<>(functionTool, tool.getValue())); funtionTools.add(new Pair<>(functionTool, tool.getValue()));
}
} }
}
addTool(new AddMemoryFunction(), Source.CORE); addTool(new AddMemoryFunction(), Source.CORE);
addTool(new RemoveMemoryFunction(), Source.CORE); addTool(new RemoveMemoryFunction(), Source.CORE);
addTool(new GetMemoryFunction(), Source.CORE); addTool(new GetMemoryFunction(), Source.CORE);
addTool(new GetMemoriesFunction(), Source.CORE); addTool(new GetMemoriesFunction(), Source.CORE);
addTool(new GetMemoryIdentitiesFunction(), Source.CORE); addTool(new GetMemoryIdentitiesFunction(), Source.CORE);
}
else {
throw new IllegalArgumentException("Ollama object is already set");
}
} }
/** /**
@@ -353,18 +348,13 @@ public class Core {
* @param ollamaObject The OllamaObject to use * @param ollamaObject The OllamaObject to use
*/ */
public void setOllamaObjectNoMemory(OllamaObject ollamaObject) { public void setOllamaObjectNoMemory(OllamaObject ollamaObject) {
if(this.ollamaObject == null) { this.ollamaObject = ollamaObject;
this.ollamaObject = ollamaObject; for(Pair<OllamaTool, String> tool : ollamaObject.getTools()) {
for(Pair<OllamaTool, String> tool : ollamaObject.getTools()) { if(tool.getKey() instanceof OllamaFunctionTool functionTool)
if(tool.getKey() instanceof OllamaFunctionTool functionTool) {
{ funtionTools.add(new Pair<>(functionTool, tool.getValue()));
funtionTools.add(new Pair<>(functionTool, tool.getValue()));
}
} }
} }
else {
throw new IllegalArgumentException("Ollama object is already set");
}
} }
/** /**
+1 -1
View File
@@ -2,7 +2,7 @@ plugins {
id 'java-library' id 'java-library'
} }
version = '0.1.4.1' version = pluginAPIVersion
repositories { repositories {
mavenCentral() mavenCentral()
+4
View File
@@ -1,3 +1,7 @@
# This is used in sub-project that dosent explicitly require the API sub-project to only include if thay shuld be included project wide. # This is used in sub-project that dosent explicitly require the API sub-project to only include if thay shuld be included project wide.
useAPI = true useAPI = true
javaVersion = 25 javaVersion = 25
coreVersion = 1.10.1
pluginAPIVersion = 0.1.4.1
APIVersion = 1.0-SNAPSHOT