From 477b74ac41c78ff07f7e6782d3c6a0b8a4f60685 Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 13:41:28 +0100 Subject: [PATCH 1/9] Update build scripts and dependencies --- api/build.gradle.kts | 24 +----- build.gradle.kts | 95 +++++------------------- core/build.gradle.kts | 29 ++------ game-runner/gradle.properties | 1 + gradle.properties | 3 +- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 15 ++-- 7 files changed, 39 insertions(+), 130 deletions(-) create mode 100644 game-runner/gradle.properties diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 81756f7..64a17b0 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -1,26 +1,10 @@ -version = "0.1.0" - -plugins { - id("java-library") -} +import net.labymod.labygradle.common.extension.LabyModAnnotationProcessorExtension.ReferenceType dependencies { + labyProcessor() labyApi("api") - - // If you want to use external libraries, you can do that here. - // The dependencies that are specified here are loaded into your project but will also - // automatically be downloaded by labymod, but only if the repository is public. - // If it is private, you have to add and compile the dependency manually. - // You have to specify the repository, there are getters for maven central and sonatype, every - // other repository has to be specified with their url. Example: - // maven(mavenCentral(), "org.apache.httpcomponents:httpclient:4.5.13") -} - -labyModProcessor { - referenceType = net.labymod.gradle.core.processor.ReferenceType.INTERFACE } -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 +labyModAnnotationProcessor { + referenceType = ReferenceType.INTERFACE } \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 58a221d..717c3e8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,99 +1,40 @@ plugins { - id("java-library") - id("net.labymod.gradle") - id("net.labymod.gradle.addon") + id("net.labymod.labygradle") + id("net.labymod.labygradle.addon") } -group = "org.example" -version = "1.0.0" - -java.toolchain.languageVersion.set(JavaLanguageVersion.of(17)) +val versions = providers.gradleProperty("net.labymod.minecraft-versions").get().split(";") -tasks.withType { - options.encoding = "UTF-8" -} +group = "org.example" +version = providers.environmentVariable("VERSION").getOrElse("1.1.3") labyMod { - defaultPackageName = "com.rappytv.labygpt" //change this to your main package name (used by all modules) + defaultPackageName = "com.rappytv.labygpt" addonInfo { namespace = "labygpt" displayName = "LabyGPT" author = "RappyTV" description = "Communicate with ChatGPT right in your Chat. Powered by OpenAI." minecraftVersion = "*" - version = System.getenv().getOrDefault("VERSION", "1.1.3") + version = rootProject.version.toString() } minecraft { - registerVersions( - "1.8.9", - "1.12.2", - "1.16.5", - "1.17.1", - "1.18.2", - "1.19.2", - "1.19.3", - "1.19.4", - "1.20.1", - "1.20.2", - "1.20.4" - ) { version, provider -> - configureRun(provider, version) - } - - subprojects.forEach { - if (it.name != "game-runner") { - filter(it.name) + registerVersion(versions.toTypedArray()) { + runs { + getByName("client") { + // When the property is set to true, you can log in with a Minecraft account + // devLogin = true + } } } } - - addonDev { - productionRelease() - } } subprojects { - plugins.apply("java-library") - plugins.apply("net.labymod.gradle") - plugins.apply("net.labymod.gradle.addon") - - repositories { - maven("https://libraries.minecraft.net/") - maven("https://repo.spongepowered.org/repository/maven-public/") - } -} - -fun configureRun(provider: net.labymod.gradle.core.minecraft.provider.VersionProvider, gameVersion: String) { - provider.runConfiguration { - mainClass = "net.minecraft.launchwrapper.Launch" - jvmArgs("-Dnet.labymod.running-version=${gameVersion}") - jvmArgs("-Dmixin.debug=true") - jvmArgs("-Dnet.labymod.debugging.all=true") - jvmArgs("-Dmixin.env.disableRefMap=true") + plugins.apply("net.labymod.labygradle") + plugins.apply("net.labymod.labygradle.addon") - args("--tweakClass", "net.labymod.core.loader.vanilla.launchwrapper.LabyModLaunchWrapperTweaker") - args("--labymod-dev-environment", "true") - args("--addon-dev-environment", "true") - } - - provider.javaVersion = when (gameVersion) { - else -> { - JavaVersion.VERSION_17 - } - } - - provider.mixin { - val mixinMinVersion = when (gameVersion) { - "1.8.9", "1.12.2", "1.16.5" -> { - "0.6.6" - } - - else -> { - "0.8.2" - } - } - - minVersion = mixinMinVersion - } -} + group = rootProject.group + version = rootProject.version +} \ No newline at end of file diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 76c17e6..f863d0e 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,30 +1,13 @@ -version = "0.1.0" - -plugins { - id("java-library") -} - -tasks.withType { - options.encoding = "UTF-8" -} +import net.labymod.labygradle.common.extension.LabyModAnnotationProcessorExtension.ReferenceType dependencies { + labyProcessor() api(project(":api")) - // If you want to use external libraries, you can do that here. - // The dependencies that are specified here are loaded into your project but will also - // automatically be downloaded by labymod, but only if the repository is public. - // If it is private, you have to add and compile the dependency manually. - // You have to specify the repository, there are getters for maven central and sonatype, every - // other repository has to be specified with their url. Example: - // maven(mavenCentral(), "org.apache.httpcomponents:httpclient:4.5.13") -} - -labyModProcessor { - referenceType = net.labymod.gradle.core.processor.ReferenceType.DEFAULT + // An example of how to add an external dependency that is used by the addon. + // addonMavenDependency("org.jeasy:easy-random:5.0.0") } -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 +labyModAnnotationProcessor { + referenceType = ReferenceType.DEFAULT } \ No newline at end of file diff --git a/game-runner/gradle.properties b/game-runner/gradle.properties new file mode 100644 index 0000000..982be3f --- /dev/null +++ b/game-runner/gradle.properties @@ -0,0 +1 @@ +lg_versioned_module=true \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 609a9ce..8f550f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1,2 @@ -org.gradle.jvmargs=-Xmx4096m \ No newline at end of file +org.gradle.jvmargs=-Xmx4096m +net.labymod.minecraft-versions=1.8.9;1.12.2;1.16.5;1.17.1;1.18.2;1.19.2;1.19.3;1.19.4;1.20.1;1.20.2;1.20.4;1.20.5;1.20.6;1.21;1.21.1 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae0804..e1adfb4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index 23d05d2..7b340cc 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,25 +1,24 @@ -rootProject.name = "LabyGPT" +rootProject.name = "labygpt" pluginManagement { - val labyGradlePluginVersion = "0.3.43" - plugins { - id("net.labymod.gradle") version (labyGradlePluginVersion) - } + val labyGradlePluginVersion = "0.5.3" buildscript { repositories { maven("https://dist.labymod.net/api/v1/maven/release/") - maven("https://repo.spongepowered.org/repository/maven-public") + maven("https://maven.neoforged.net/releases/") + maven("https://maven.fabricmc.net/") + gradlePluginPortal() mavenCentral() } dependencies { - classpath("net.labymod.gradle", "addon", labyGradlePluginVersion) + classpath("net.labymod.gradle", "common", labyGradlePluginVersion) } } } -plugins.apply("net.labymod.gradle") +plugins.apply("net.labymod.labygradle.settings") include(":api") include(":core") From eadbef87c95676df7a44f98335706e50ba3985e4 Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 13:47:32 +0100 Subject: [PATCH 2/9] Add newer models and remove outdated ones --- core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java b/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java index d78149a..9d42bf6 100644 --- a/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java +++ b/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java @@ -16,7 +16,7 @@ public class GPTSubConfig extends Config { @Exclude - private final String[] models = new String[]{"GPT-3.5-Turbo", "GPT-3.5-Turbo-16k", "GPT-4", "GPT-4-32k"}; + private final String[] models = new String[]{"gpt-3.5-turbo", "gpt-4-turbo", "gpt-4", "chatgpt-4o-latest", "gpt-4o", "gpt-4o-mini"}; @DropdownSetting @SpriteSlot(size = 32, x = 1) From b94abe6f3588c06126ad2a5a720ecab3beabbe74 Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 13:50:10 +0100 Subject: [PATCH 3/9] Move subcommands into main command --- .../java/com/rappytv/labygpt/GPTAddon.java | 2 +- .../{commands => command}/GPTCommand.java | 62 +++++++++++++++++-- .../subcommands/GPTClearSubCommand.java | 24 ------- .../subcommands/GPTHistorySubCommand.java | 39 ------------ 4 files changed, 57 insertions(+), 70 deletions(-) rename core/src/main/java/com/rappytv/labygpt/{commands => command}/GPTCommand.java (50%) delete mode 100644 core/src/main/java/com/rappytv/labygpt/commands/subcommands/GPTClearSubCommand.java delete mode 100644 core/src/main/java/com/rappytv/labygpt/commands/subcommands/GPTHistorySubCommand.java diff --git a/core/src/main/java/com/rappytv/labygpt/GPTAddon.java b/core/src/main/java/com/rappytv/labygpt/GPTAddon.java index 7f84267..b5cff5c 100644 --- a/core/src/main/java/com/rappytv/labygpt/GPTAddon.java +++ b/core/src/main/java/com/rappytv/labygpt/GPTAddon.java @@ -1,7 +1,7 @@ package com.rappytv.labygpt; import com.rappytv.labygpt.api.GPTMessage; -import com.rappytv.labygpt.commands.GPTCommand; +import com.rappytv.labygpt.command.GPTCommand; import com.rappytv.labygpt.config.GPTAddonConfig; import net.labymod.api.addon.LabyAddon; import net.labymod.api.client.component.Component; diff --git a/core/src/main/java/com/rappytv/labygpt/commands/GPTCommand.java b/core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java similarity index 50% rename from core/src/main/java/com/rappytv/labygpt/commands/GPTCommand.java rename to core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java index 096947e..fc05e69 100644 --- a/core/src/main/java/com/rappytv/labygpt/commands/GPTCommand.java +++ b/core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java @@ -1,10 +1,11 @@ -package com.rappytv.labygpt.commands; +package com.rappytv.labygpt.command; import com.rappytv.labygpt.GPTAddon; +import com.rappytv.labygpt.api.GPTMessage; import com.rappytv.labygpt.api.GPTRequest; -import com.rappytv.labygpt.commands.subcommands.GPTClearSubCommand; -import com.rappytv.labygpt.commands.subcommands.GPTHistorySubCommand; +import com.rappytv.labygpt.api.GPTRole; import net.labymod.api.client.chat.command.Command; +import net.labymod.api.client.chat.command.SubCommand; import net.labymod.api.client.component.Component; import net.labymod.api.client.component.format.NamedTextColor; import net.labymod.api.util.I18n; @@ -18,8 +19,8 @@ public GPTCommand(GPTAddon addon) { super("gpt"); this.addon = addon; - withSubCommand(new GPTClearSubCommand()); - withSubCommand(new GPTHistorySubCommand()); + withSubCommand(new ClearSubCommand()); + withSubCommand(new HistorySubCommand()); } @Override @@ -48,7 +49,7 @@ public boolean execute(String prefix, String[] arguments) { ).thenRun(() -> { // Callback logic when the request is done: if (!request.isSuccessful() || request.getOutput() == null) { - GPTAddon.queryHistory.remove(GPTAddon.queryHistory.size() - 1); + GPTAddon.queryHistory.removeLast(); displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.text( Objects.requireNonNullElseGet(request.getError(), () -> I18n.translate("labygpt.messages.requestError")), @@ -65,4 +66,53 @@ public boolean execute(String prefix, String[] arguments) { return true; } + + public static class ClearSubCommand extends SubCommand { + + public ClearSubCommand() { + super("clear"); + } + + @Override + public boolean execute(String prefix, String[] arguments) { + if(GPTAddon.queryHistory.isEmpty()) { + displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.alreadyEmptyHistory", NamedTextColor.RED))); + return true; + } + GPTAddon.queryHistory.clear(); + displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.historyCleared", NamedTextColor.GREEN))); + return true; + } + } + + public static class HistorySubCommand extends SubCommand { + + public HistorySubCommand() { + super("history"); + } + + @Override + public boolean execute(String prefix, String[] arguments) { + if(GPTAddon.queryHistory.size() < 2) { + displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.emptyHistory", NamedTextColor.RED))); + return true; + } + + Component component = Component.empty(); + for(int i = 0; i < GPTAddon.queryHistory.size(); i++) { + GPTMessage message = GPTAddon.queryHistory.get(i); + String name = message.name.isEmpty() ? labyAPI.getName() : message.name; + if(message.role != GPTRole.System) + component + .append(Component.text(i == 0 ? "" : "\n")) + .append(Component.text("[", NamedTextColor.DARK_GRAY)) + .append(Component.text(name)) + .append(Component.text("] ", NamedTextColor.DARK_GRAY)) + .append(Component.text(message.content.replace("\n\n", ""), NamedTextColor.WHITE)); + } + + displayMessage(component); + return true; + } + } } \ No newline at end of file diff --git a/core/src/main/java/com/rappytv/labygpt/commands/subcommands/GPTClearSubCommand.java b/core/src/main/java/com/rappytv/labygpt/commands/subcommands/GPTClearSubCommand.java deleted file mode 100644 index adec0da..0000000 --- a/core/src/main/java/com/rappytv/labygpt/commands/subcommands/GPTClearSubCommand.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.rappytv.labygpt.commands.subcommands; - -import com.rappytv.labygpt.GPTAddon; -import net.labymod.api.client.chat.command.SubCommand; -import net.labymod.api.client.component.Component; -import net.labymod.api.client.component.format.NamedTextColor; - -public class GPTClearSubCommand extends SubCommand { - - public GPTClearSubCommand() { - super("clear"); - } - - @Override - public boolean execute(String prefix, String[] arguments) { - if(GPTAddon.queryHistory.isEmpty()) { - displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.alreadyEmptyHistory", NamedTextColor.RED))); - return true; - } - GPTAddon.queryHistory.clear(); - displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.historyCleared", NamedTextColor.GREEN))); - return true; - } -} diff --git a/core/src/main/java/com/rappytv/labygpt/commands/subcommands/GPTHistorySubCommand.java b/core/src/main/java/com/rappytv/labygpt/commands/subcommands/GPTHistorySubCommand.java deleted file mode 100644 index 8fdf87a..0000000 --- a/core/src/main/java/com/rappytv/labygpt/commands/subcommands/GPTHistorySubCommand.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.rappytv.labygpt.commands.subcommands; - -import com.rappytv.labygpt.GPTAddon; -import com.rappytv.labygpt.api.GPTMessage; -import com.rappytv.labygpt.api.GPTRole; -import net.labymod.api.client.chat.command.SubCommand; -import net.labymod.api.client.component.Component; -import net.labymod.api.client.component.format.NamedTextColor; - -public class GPTHistorySubCommand extends SubCommand { - - public GPTHistorySubCommand() { - super("history"); - } - - @Override - public boolean execute(String prefix, String[] arguments) { - if(GPTAddon.queryHistory.size() < 2) { - displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.emptyHistory", NamedTextColor.RED))); - return true; - } - - Component component = Component.empty(); - for(int i = 0; i < GPTAddon.queryHistory.size(); i++) { - GPTMessage message = GPTAddon.queryHistory.get(i); - String name = message.name.isEmpty() ? labyAPI.getName() : message.name; - if(message.role != GPTRole.System) - component - .append(Component.text(i == 0 ? "" : "\n")) - .append(Component.text("[", NamedTextColor.DARK_GRAY)) - .append(Component.text(name)) - .append(Component.text("] ", NamedTextColor.DARK_GRAY)) - .append(Component.text(message.content.replace("\n\n", ""), NamedTextColor.WHITE)); - } - - displayMessage(component); - return true; - } -} From 50f907ef87f32ca5f27936e6037b3aea4efd3a98 Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 19:34:31 +0100 Subject: [PATCH 4/9] Use LabyMod's request system --- .../com/rappytv/labygpt/api/GPTMessage.java | 11 ++ .../com/rappytv/labygpt/api/GPTRequest.java | 115 ++++++++---------- .../java/com/rappytv/labygpt/api/GPTRole.java | 12 -- .../com/rappytv/labygpt/api/RequestBody.java | 16 --- .../rappytv/labygpt/command/GPTCommand.java | 42 ++++--- 5 files changed, 82 insertions(+), 114 deletions(-) delete mode 100644 core/src/main/java/com/rappytv/labygpt/api/GPTRole.java delete mode 100644 core/src/main/java/com/rappytv/labygpt/api/RequestBody.java diff --git a/core/src/main/java/com/rappytv/labygpt/api/GPTMessage.java b/core/src/main/java/com/rappytv/labygpt/api/GPTMessage.java index 011701a..ff67135 100644 --- a/core/src/main/java/com/rappytv/labygpt/api/GPTMessage.java +++ b/core/src/main/java/com/rappytv/labygpt/api/GPTMessage.java @@ -1,5 +1,7 @@ package com.rappytv.labygpt.api; +import com.google.gson.annotations.SerializedName; + public class GPTMessage { public String content; public GPTRole role; @@ -10,4 +12,13 @@ public GPTMessage(String content, GPTRole role, String name) { this.role = role; this.name = name; } + + public enum GPTRole { + @SerializedName("system") + System, + @SerializedName("user") + User, + @SerializedName("assistant") + Assistant + } } diff --git a/core/src/main/java/com/rappytv/labygpt/api/GPTRequest.java b/core/src/main/java/com/rappytv/labygpt/api/GPTRequest.java index 05a037e..f5fbedf 100644 --- a/core/src/main/java/com/rappytv/labygpt/api/GPTRequest.java +++ b/core/src/main/java/com/rappytv/labygpt/api/GPTRequest.java @@ -2,84 +2,67 @@ import com.google.gson.Gson; import com.rappytv.labygpt.GPTAddon; +import com.rappytv.labygpt.api.GPTMessage.GPTRole; import net.labymod.api.util.I18n; -import java.net.URI; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.net.http.HttpRequest.BodyPublishers; -import java.net.http.HttpResponse.BodyHandlers; -import java.util.concurrent.CompletableFuture; +import net.labymod.api.util.io.web.request.Request; +import net.labymod.api.util.io.web.request.Request.Method; +import java.util.Map; +import java.util.function.Consumer; public class GPTRequest { - private boolean successful; - private String output; - private String error; + private final static Gson gson = new Gson(); - public CompletableFuture sendRequestAsync(String query, String key, String username, - String model, String behavior) { - Gson gson = new Gson(); - CompletableFuture future = new CompletableFuture<>(); + public static void sendRequestAsync(String query, String key, String username, + String model, String behavior, Consumer responseConsumer) { - try { - if (GPTAddon.queryHistory.isEmpty()) { - GPTAddon.queryHistory.add(new GPTMessage(behavior, GPTRole.System, "System")); - } - GPTAddon.queryHistory.add(new GPTMessage(query, GPTRole.User, username)); - RequestBody apiRequestBody = new RequestBody(model, GPTAddon.queryHistory, username); + if(GPTAddon.queryHistory.isEmpty()) { + GPTAddon.queryHistory.add(new GPTMessage(behavior, GPTRole.System, "System")); + } + GPTAddon.queryHistory.add(new GPTMessage(query, GPTRole.User, username)); - HttpRequest request = HttpRequest.newBuilder() - .uri(new URI("https://api.openai.com/v1/chat/completions")) - .header("Content-Type", "application/json") - .header("Authorization", "Bearer " + key) - .POST(BodyPublishers.ofString(gson.toJson(apiRequestBody))) - .build(); + Map body = Map.of( + "model", model, + "messages", gson.toJson(GPTAddon.queryHistory), + "user", username + ); - HttpClient client = HttpClient.newHttpClient(); - client.sendAsync(request, BodyHandlers.ofString()) - .thenAccept(response -> { - ResponseBody responseBody = gson.fromJson(response.body(), ResponseBody.class); + Request.ofGson(ResponseBody.class) + .url("https://api.openai.com/v1/chat/completions") + .method(Method.POST) + .addHeader("Content-Type", "application/json") + .addHeader("Authorization", "Bearer " + key) + .json(body) + .handleErrorStream() + .async() + .execute(response -> { + boolean successful; + String output = null; + String error = null; + ResponseBody responseBody = response.get(); - if (responseBody.error != null) { - error = responseBody.error.message; - if (error.isEmpty() && responseBody.error.code.equals("invalid_api_key")) { - error = I18n.translate("labygpt.messages.invalidBearer"); - } - successful = false; - } else if (responseBody.choices.isEmpty()) { - successful = false; - } else { - GPTMessage message = responseBody.choices.get(0).message; - output = message.content.replace("\n\n", ""); - GPTAddon.queryHistory.add( - new GPTMessage(message.content, GPTRole.Assistant, "LabyGPT")); - successful = true; + if(response.hasException()) { + successful = false; + error = response.exception().getLocalizedMessage(); + } else if(responseBody.error != null) { + error = responseBody.error.message; + if (error.isEmpty() && responseBody.error.code.equals("invalid_api_key")) { + error = I18n.translate("labygpt.messages.invalidBearer"); } - - future.complete(null); - }).exceptionally((e) -> { - future.completeExceptionally(e); - error = e.getMessage(); - return null; - }); - } catch (Exception e) { - e.printStackTrace(); - future.completeExceptionally(e); - error = e.getMessage(); - } - - return future; + successful = false; + } else if(responseBody.choices.isEmpty()) { + successful = false; + } else { + GPTMessage message = responseBody.choices.getFirst().message; + output = message.content.replace("\n\n", ""); + GPTAddon.queryHistory.add(new GPTMessage(output, GPTRole.Assistant, username)); + successful = true; + } + responseConsumer.accept(new ApiResponse(successful, output, error)); + }); } - public boolean isSuccessful() { - return successful; - } - - public String getOutput() { - return output; - } + public record ApiResponse(boolean successful, String output, String error) { - public String getError() { - return error; } } \ No newline at end of file diff --git a/core/src/main/java/com/rappytv/labygpt/api/GPTRole.java b/core/src/main/java/com/rappytv/labygpt/api/GPTRole.java deleted file mode 100644 index 7f9f6f8..0000000 --- a/core/src/main/java/com/rappytv/labygpt/api/GPTRole.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.rappytv.labygpt.api; - -import com.google.gson.annotations.SerializedName; - -public enum GPTRole { - @SerializedName("system") - System, - @SerializedName("user") - User, - @SerializedName("assistant") - Assistant -} diff --git a/core/src/main/java/com/rappytv/labygpt/api/RequestBody.java b/core/src/main/java/com/rappytv/labygpt/api/RequestBody.java deleted file mode 100644 index db91e4b..0000000 --- a/core/src/main/java/com/rappytv/labygpt/api/RequestBody.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.rappytv.labygpt.api; - -import java.util.ArrayList; - -public class RequestBody { - - public String model; - public ArrayList messages; - public String user; - - public RequestBody(String model, ArrayList messages, String user) { - this.model = model; - this.messages = messages; - this.user = user; - } -} diff --git a/core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java b/core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java index fc05e69..329d2e6 100644 --- a/core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java +++ b/core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java @@ -2,8 +2,8 @@ import com.rappytv.labygpt.GPTAddon; import com.rappytv.labygpt.api.GPTMessage; +import com.rappytv.labygpt.api.GPTMessage.GPTRole; import com.rappytv.labygpt.api.GPTRequest; -import com.rappytv.labygpt.api.GPTRole; import net.labymod.api.client.chat.command.Command; import net.labymod.api.client.chat.command.SubCommand; import net.labymod.api.client.component.Component; @@ -39,30 +39,32 @@ public boolean execute(String prefix, String[] arguments) { if (!addon.configuration().saveHistory()) { GPTAddon.queryHistory.clear(); } - GPTRequest request = new GPTRequest(); - request.sendRequestAsync( + GPTRequest.sendRequestAsync( String.join(" ", arguments), addon.configuration().openAI().bearer(), addon.configuration().openAI().shareUsername() ? labyAPI.getName() : "", addon.configuration().gpt().model().get().toLowerCase(), - addon.configuration().gpt().behavior().get() - ).thenRun(() -> { - // Callback logic when the request is done: - if (!request.isSuccessful() || request.getOutput() == null) { - GPTAddon.queryHistory.removeLast(); - displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.text( - Objects.requireNonNullElseGet(request.getError(), - () -> I18n.translate("labygpt.messages.requestError")), - NamedTextColor.RED))); - } else { - displayMessage(Component.empty().append(GPTAddon.prefix) - .append(Component.text(request.getOutput(), NamedTextColor.WHITE))); + addon.configuration().gpt().behavior().get(), + (response) -> { + if (!response.successful() || response.output() == null) { + GPTAddon.queryHistory.removeLast(); + displayMessage( + Component.empty() + .append(GPTAddon.prefix) + .append(Component.text( + Objects.requireNonNullElse( + response.error(), + I18n.translate("labygpt.messages.requestError") + ), + NamedTextColor.RED + )) + ); + } else { + displayMessage(Component.empty().append(GPTAddon.prefix) + .append(Component.text(response.output(), NamedTextColor.WHITE))); + } } - }).exceptionally((e) -> { - displayMessage(Component.empty().append(GPTAddon.prefix) - .append(Component.text(e.getMessage(), NamedTextColor.RED))); - return null; - }); + ); return true; } From 0b49e7813c71b6355afdcbcf26d32d9811d92a47 Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 19:35:51 +0100 Subject: [PATCH 5/9] Move model array into main class, put saveHistory option above subconfigs --- core/src/main/java/com/rappytv/labygpt/GPTAddon.java | 1 + .../java/com/rappytv/labygpt/config/GPTAddonConfig.java | 6 +++--- .../java/com/rappytv/labygpt/config/GPTSubConfig.java | 9 +++------ 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/com/rappytv/labygpt/GPTAddon.java b/core/src/main/java/com/rappytv/labygpt/GPTAddon.java index b5cff5c..5851898 100644 --- a/core/src/main/java/com/rappytv/labygpt/GPTAddon.java +++ b/core/src/main/java/com/rappytv/labygpt/GPTAddon.java @@ -16,6 +16,7 @@ public class GPTAddon extends LabyAddon { .append(Component.text("LabyGPT", NamedTextColor.BLUE)) .append(Component.text("] ", NamedTextColor.DARK_GRAY)); public static final ArrayList queryHistory = new ArrayList<>(); + public static final String[] models = new String[]{"gpt-3.5-turbo", "gpt-4-turbo", "gpt-4", "chatgpt-4o-latest", "gpt-4o", "gpt-4o-mini"}; @Override protected void enable() { diff --git a/core/src/main/java/com/rappytv/labygpt/config/GPTAddonConfig.java b/core/src/main/java/com/rappytv/labygpt/config/GPTAddonConfig.java index 263a4ba..390c3ce 100644 --- a/core/src/main/java/com/rappytv/labygpt/config/GPTAddonConfig.java +++ b/core/src/main/java/com/rappytv/labygpt/config/GPTAddonConfig.java @@ -14,13 +14,13 @@ public class GPTAddonConfig extends AddonConfig { @SwitchSetting @SpriteSlot(size = 32) private final ConfigProperty enabled = new ConfigProperty<>(true); + @SwitchSetting + @SpriteSlot(size = 32, x = 2, y = 1) + private final ConfigProperty saveHistory = new ConfigProperty<>(true); @SpriteSlot(size = 32, x = 1) private final OpenAISubConfig openAI = new OpenAISubConfig(); @SpriteSlot(size = 32, x = 1) private final GPTSubConfig gpt = new GPTSubConfig(); - @SwitchSetting - @SpriteSlot(size = 32, x = 2, y = 1) - private final ConfigProperty saveHistory = new ConfigProperty<>(true); @Override public ConfigProperty enabled() { diff --git a/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java b/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java index 9d42bf6..c241aff 100644 --- a/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java +++ b/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java @@ -1,11 +1,11 @@ package com.rappytv.labygpt.config; +import com.rappytv.labygpt.GPTAddon; import net.labymod.api.client.gui.screen.widget.Widget; import net.labymod.api.client.gui.screen.widget.widgets.input.TextFieldWidget.TextFieldSetting; import net.labymod.api.client.gui.screen.widget.widgets.input.dropdown.DropdownWidget; import net.labymod.api.client.gui.screen.widget.widgets.input.dropdown.DropdownWidget.DropdownSetting; import net.labymod.api.configuration.loader.Config; -import net.labymod.api.configuration.loader.annotation.Exclude; import net.labymod.api.configuration.loader.annotation.SpriteSlot; import net.labymod.api.configuration.loader.property.ConfigProperty; import net.labymod.api.configuration.settings.annotation.SettingListener; @@ -15,12 +15,9 @@ public class GPTSubConfig extends Config { - @Exclude - private final String[] models = new String[]{"gpt-3.5-turbo", "gpt-4-turbo", "gpt-4", "chatgpt-4o-latest", "gpt-4o", "gpt-4o-mini"}; - @DropdownSetting @SpriteSlot(size = 32, x = 1) - private final ConfigProperty model = new ConfigProperty<>(models[0]); + private final ConfigProperty model = new ConfigProperty<>(GPTAddon.models[0]); @TextFieldSetting @SpriteSlot(size = 32, x = 1, y = 1) private final ConfigProperty behavior = new ConfigProperty<>("You are a helpful assistant."); @@ -29,7 +26,7 @@ public class GPTSubConfig extends Config { @SettingListener(target = "model", type = EventType.INITIALIZE) public void initialize(SettingElement setting) { DropdownWidget widget = (DropdownWidget) setting.asElement().getWidgets()[0]; - widget.addAll(models); + widget.addAll(GPTAddon.models); setting.setWidgets(Collections.singletonList(widget) .toArray(new Widget[0])); } From d43688ffeb910e77dc31e45ee25db3c5c65f8e0e Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 19:40:52 +0100 Subject: [PATCH 6/9] Move api code into api module --- .../com/rappytv/labygpt/api/GPTMessage.java | 0 .../com/rappytv/labygpt/api/GPTRequest.java | 13 +++++++------ .../com/rappytv/labygpt/api/ResponseBody.java | 0 build.gradle.kts | 5 ++--- .../rappytv/labygpt/{ => core}/GPTAddon.java | 9 +++------ .../labygpt/{ => core}/command/GPTCommand.java | 18 +++++++++--------- .../{ => core}/config/GPTAddonConfig.java | 2 +- .../{ => core}/config/GPTSubConfig.java | 4 ++-- .../{ => core}/config/OpenAISubConfig.java | 2 +- 9 files changed, 25 insertions(+), 28 deletions(-) rename {core => api}/src/main/java/com/rappytv/labygpt/api/GPTMessage.java (100%) rename {core => api}/src/main/java/com/rappytv/labygpt/api/GPTRequest.java (83%) rename {core => api}/src/main/java/com/rappytv/labygpt/api/ResponseBody.java (100%) rename core/src/main/java/com/rappytv/labygpt/{ => core}/GPTAddon.java (76%) rename core/src/main/java/com/rappytv/labygpt/{ => core}/command/GPTCommand.java (90%) rename core/src/main/java/com/rappytv/labygpt/{ => core}/config/GPTAddonConfig.java (96%) rename core/src/main/java/com/rappytv/labygpt/{ => core}/config/GPTSubConfig.java (95%) rename core/src/main/java/com/rappytv/labygpt/{ => core}/config/OpenAISubConfig.java (96%) diff --git a/core/src/main/java/com/rappytv/labygpt/api/GPTMessage.java b/api/src/main/java/com/rappytv/labygpt/api/GPTMessage.java similarity index 100% rename from core/src/main/java/com/rappytv/labygpt/api/GPTMessage.java rename to api/src/main/java/com/rappytv/labygpt/api/GPTMessage.java diff --git a/core/src/main/java/com/rappytv/labygpt/api/GPTRequest.java b/api/src/main/java/com/rappytv/labygpt/api/GPTRequest.java similarity index 83% rename from core/src/main/java/com/rappytv/labygpt/api/GPTRequest.java rename to api/src/main/java/com/rappytv/labygpt/api/GPTRequest.java index f5fbedf..1f65f83 100644 --- a/core/src/main/java/com/rappytv/labygpt/api/GPTRequest.java +++ b/api/src/main/java/com/rappytv/labygpt/api/GPTRequest.java @@ -1,29 +1,30 @@ package com.rappytv.labygpt.api; import com.google.gson.Gson; -import com.rappytv.labygpt.GPTAddon; import com.rappytv.labygpt.api.GPTMessage.GPTRole; import net.labymod.api.util.I18n; import net.labymod.api.util.io.web.request.Request; import net.labymod.api.util.io.web.request.Request.Method; +import java.util.ArrayList; import java.util.Map; import java.util.function.Consumer; public class GPTRequest { private final static Gson gson = new Gson(); + public static final ArrayList queryHistory = new ArrayList<>(); public static void sendRequestAsync(String query, String key, String username, String model, String behavior, Consumer responseConsumer) { - if(GPTAddon.queryHistory.isEmpty()) { - GPTAddon.queryHistory.add(new GPTMessage(behavior, GPTRole.System, "System")); + if(queryHistory.isEmpty()) { + queryHistory.add(new GPTMessage(behavior, GPTRole.System, "System")); } - GPTAddon.queryHistory.add(new GPTMessage(query, GPTRole.User, username)); + queryHistory.add(new GPTMessage(query, GPTRole.User, username)); Map body = Map.of( "model", model, - "messages", gson.toJson(GPTAddon.queryHistory), + "messages", gson.toJson(queryHistory), "user", username ); @@ -55,7 +56,7 @@ public static void sendRequestAsync(String query, String key, String username, } else { GPTMessage message = responseBody.choices.getFirst().message; output = message.content.replace("\n\n", ""); - GPTAddon.queryHistory.add(new GPTMessage(output, GPTRole.Assistant, username)); + queryHistory.add(new GPTMessage(output, GPTRole.Assistant, username)); successful = true; } responseConsumer.accept(new ApiResponse(successful, output, error)); diff --git a/core/src/main/java/com/rappytv/labygpt/api/ResponseBody.java b/api/src/main/java/com/rappytv/labygpt/api/ResponseBody.java similarity index 100% rename from core/src/main/java/com/rappytv/labygpt/api/ResponseBody.java rename to api/src/main/java/com/rappytv/labygpt/api/ResponseBody.java diff --git a/build.gradle.kts b/build.gradle.kts index 717c3e8..0194258 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ group = "org.example" version = providers.environmentVariable("VERSION").getOrElse("1.1.3") labyMod { - defaultPackageName = "com.rappytv.labygpt" + defaultPackageName = "com.rappytv.labygpt.core" addonInfo { namespace = "labygpt" displayName = "LabyGPT" @@ -23,8 +23,7 @@ labyMod { registerVersion(versions.toTypedArray()) { runs { getByName("client") { - // When the property is set to true, you can log in with a Minecraft account - // devLogin = true + devLogin = true } } } diff --git a/core/src/main/java/com/rappytv/labygpt/GPTAddon.java b/core/src/main/java/com/rappytv/labygpt/core/GPTAddon.java similarity index 76% rename from core/src/main/java/com/rappytv/labygpt/GPTAddon.java rename to core/src/main/java/com/rappytv/labygpt/core/GPTAddon.java index 5851898..285f5ce 100644 --- a/core/src/main/java/com/rappytv/labygpt/GPTAddon.java +++ b/core/src/main/java/com/rappytv/labygpt/core/GPTAddon.java @@ -1,13 +1,11 @@ -package com.rappytv.labygpt; +package com.rappytv.labygpt.core; -import com.rappytv.labygpt.api.GPTMessage; -import com.rappytv.labygpt.command.GPTCommand; -import com.rappytv.labygpt.config.GPTAddonConfig; +import com.rappytv.labygpt.core.command.GPTCommand; +import com.rappytv.labygpt.core.config.GPTAddonConfig; import net.labymod.api.addon.LabyAddon; import net.labymod.api.client.component.Component; import net.labymod.api.client.component.format.NamedTextColor; import net.labymod.api.models.addon.annotation.AddonMain; -import java.util.ArrayList; @AddonMain public class GPTAddon extends LabyAddon { @@ -15,7 +13,6 @@ public class GPTAddon extends LabyAddon { public static final Component prefix = Component.text("[", NamedTextColor.DARK_GRAY) .append(Component.text("LabyGPT", NamedTextColor.BLUE)) .append(Component.text("] ", NamedTextColor.DARK_GRAY)); - public static final ArrayList queryHistory = new ArrayList<>(); public static final String[] models = new String[]{"gpt-3.5-turbo", "gpt-4-turbo", "gpt-4", "chatgpt-4o-latest", "gpt-4o", "gpt-4o-mini"}; @Override diff --git a/core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java b/core/src/main/java/com/rappytv/labygpt/core/command/GPTCommand.java similarity index 90% rename from core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java rename to core/src/main/java/com/rappytv/labygpt/core/command/GPTCommand.java index 329d2e6..53f34a5 100644 --- a/core/src/main/java/com/rappytv/labygpt/command/GPTCommand.java +++ b/core/src/main/java/com/rappytv/labygpt/core/command/GPTCommand.java @@ -1,6 +1,6 @@ -package com.rappytv.labygpt.command; +package com.rappytv.labygpt.core.command; -import com.rappytv.labygpt.GPTAddon; +import com.rappytv.labygpt.core.GPTAddon; import com.rappytv.labygpt.api.GPTMessage; import com.rappytv.labygpt.api.GPTMessage.GPTRole; import com.rappytv.labygpt.api.GPTRequest; @@ -37,7 +37,7 @@ public boolean execute(String prefix, String[] arguments) { } if (!addon.configuration().saveHistory()) { - GPTAddon.queryHistory.clear(); + GPTRequest.queryHistory.clear(); } GPTRequest.sendRequestAsync( String.join(" ", arguments), @@ -47,7 +47,7 @@ public boolean execute(String prefix, String[] arguments) { addon.configuration().gpt().behavior().get(), (response) -> { if (!response.successful() || response.output() == null) { - GPTAddon.queryHistory.removeLast(); + GPTRequest.queryHistory.removeLast(); displayMessage( Component.empty() .append(GPTAddon.prefix) @@ -77,11 +77,11 @@ public ClearSubCommand() { @Override public boolean execute(String prefix, String[] arguments) { - if(GPTAddon.queryHistory.isEmpty()) { + if(GPTRequest.queryHistory.isEmpty()) { displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.alreadyEmptyHistory", NamedTextColor.RED))); return true; } - GPTAddon.queryHistory.clear(); + GPTRequest.queryHistory.clear(); displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.historyCleared", NamedTextColor.GREEN))); return true; } @@ -95,14 +95,14 @@ public HistorySubCommand() { @Override public boolean execute(String prefix, String[] arguments) { - if(GPTAddon.queryHistory.size() < 2) { + if(GPTRequest.queryHistory.size() < 2) { displayMessage(Component.empty().append(GPTAddon.prefix).append(Component.translatable("labygpt.messages.emptyHistory", NamedTextColor.RED))); return true; } Component component = Component.empty(); - for(int i = 0; i < GPTAddon.queryHistory.size(); i++) { - GPTMessage message = GPTAddon.queryHistory.get(i); + for(int i = 0; i < GPTRequest.queryHistory.size(); i++) { + GPTMessage message = GPTRequest.queryHistory.get(i); String name = message.name.isEmpty() ? labyAPI.getName() : message.name; if(message.role != GPTRole.System) component diff --git a/core/src/main/java/com/rappytv/labygpt/config/GPTAddonConfig.java b/core/src/main/java/com/rappytv/labygpt/core/config/GPTAddonConfig.java similarity index 96% rename from core/src/main/java/com/rappytv/labygpt/config/GPTAddonConfig.java rename to core/src/main/java/com/rappytv/labygpt/core/config/GPTAddonConfig.java index 390c3ce..38a4f25 100644 --- a/core/src/main/java/com/rappytv/labygpt/config/GPTAddonConfig.java +++ b/core/src/main/java/com/rappytv/labygpt/core/config/GPTAddonConfig.java @@ -1,4 +1,4 @@ -package com.rappytv.labygpt.config; +package com.rappytv.labygpt.core.config; import net.labymod.api.addon.AddonConfig; import net.labymod.api.client.gui.screen.widget.widgets.input.SwitchWidget.SwitchSetting; diff --git a/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java b/core/src/main/java/com/rappytv/labygpt/core/config/GPTSubConfig.java similarity index 95% rename from core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java rename to core/src/main/java/com/rappytv/labygpt/core/config/GPTSubConfig.java index c241aff..83ebb42 100644 --- a/core/src/main/java/com/rappytv/labygpt/config/GPTSubConfig.java +++ b/core/src/main/java/com/rappytv/labygpt/core/config/GPTSubConfig.java @@ -1,6 +1,6 @@ -package com.rappytv.labygpt.config; +package com.rappytv.labygpt.core.config; -import com.rappytv.labygpt.GPTAddon; +import com.rappytv.labygpt.core.GPTAddon; import net.labymod.api.client.gui.screen.widget.Widget; import net.labymod.api.client.gui.screen.widget.widgets.input.TextFieldWidget.TextFieldSetting; import net.labymod.api.client.gui.screen.widget.widgets.input.dropdown.DropdownWidget; diff --git a/core/src/main/java/com/rappytv/labygpt/config/OpenAISubConfig.java b/core/src/main/java/com/rappytv/labygpt/core/config/OpenAISubConfig.java similarity index 96% rename from core/src/main/java/com/rappytv/labygpt/config/OpenAISubConfig.java rename to core/src/main/java/com/rappytv/labygpt/core/config/OpenAISubConfig.java index 0a3cea5..71397af 100644 --- a/core/src/main/java/com/rappytv/labygpt/config/OpenAISubConfig.java +++ b/core/src/main/java/com/rappytv/labygpt/core/config/OpenAISubConfig.java @@ -1,4 +1,4 @@ -package com.rappytv.labygpt.config; +package com.rappytv.labygpt.core.config; import net.labymod.api.Laby; import net.labymod.api.client.gui.screen.widget.widgets.input.ButtonWidget.ButtonSetting; From 378c6e2643d2595d67ec443896043e107d93c3bc Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 19:45:33 +0100 Subject: [PATCH 7/9] Update workflow --- .github/workflows/build.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73ab510..0e33113 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,26 +7,22 @@ on: branches: [ "master", "main" ] workflow_dispatch: -env: - PUBLIC_RELEASE_BUILD: true - PUBLIC_RELEASE_BUILD_TOKEN: ${{ secrets.PUBLIC_RELEASE_BUILD_TOKEN }} - jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: distribution: 'corretto' - java-version: '17' + java-version: '21' - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle run: ./gradlew build --full-stacktrace - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/*-release.jar \ No newline at end of file From 6e13a1592fe0317c843eb813ed804175a728a49b Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 19:46:08 +0100 Subject: [PATCH 8/9] Update readme --- readme.md | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/readme.md b/readme.md index 98fe5a3..e39e8a3 100644 --- a/readme.md +++ b/readme.md @@ -4,27 +4,11 @@ Communicate with ChatGPT right in your Chat.
Powered by [OpenAI](https://open ### Installation 1. Press `Win` + `R` -2. Paste this into the window that popped up: `%appdata%/.minecraft/LabyMod-neo/addons` and press enter (This path may change when lm4 gets released) +2. Paste this into the window that popped up: `%appdata%/.minecraft/LabyMod-neo/addons` and press enter 3. It should open your Labymod addon directory; Paste the [LabyGPT.jar](https://github.com/RappyLabyAddons/LabyGPT/releases/latest/download/LabyGPT.jar) in there. 4. Launch your Labymod client. If you have any problems with the addon/have update ideas, feel free to - Open an Issue [here](https://github.com/RappyLabyAddons/LabyGPT/issues/new/choose) or -- Open a ticket on my [Discord Server](https://rappytv.com/server) in [this](https://discord.com/channels/815912035124248587/840285653946204181) channel - ---- - -### Social Networks - -[RappyTV | Website][website] -[RappyTV | YouTube][youtube] -[RappyTV | Instagram][instagram] -[RappyTV | Discord][server] -[RappyTV | TikTok][tiktok] - -[website]: https://rappytv.com/ -[youtube]: https://youtube.com/c/RappyTVTutorials -[instagram]: https://instagram.com/rappyytv -[server]: https://rappytv.com/server -[tiktok]: https://tiktok.com/@rappytv +- Open a ticket on my [Discord Server](https://rappytv.com/server) in [this](https://discord.com/channels/815912035124248587/840285653946204181) channel \ No newline at end of file From 93ae5fdde2554335aaf8032be2634d93dc6bf3f3 Mon Sep 17 00:00:00 2001 From: RappyTV Date: Sat, 7 Dec 2024 19:46:50 +0100 Subject: [PATCH 9/9] Bump version --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0194258..837a8c9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { val versions = providers.gradleProperty("net.labymod.minecraft-versions").get().split(";") group = "org.example" -version = providers.environmentVariable("VERSION").getOrElse("1.1.3") +version = providers.environmentVariable("VERSION").getOrElse("1.1.4") labyMod { defaultPackageName = "com.rappytv.labygpt.core"