From f9f30acad224755d8bffc0b60cce68b09cce86c2 Mon Sep 17 00:00:00 2001 From: Oleh Astappiev Date: Fri, 13 Oct 2023 21:45:13 +0200 Subject: [PATCH] chore: switch to stable jdk21 --- .github/workflows/main.yml | 2 +- .github/workflows/publish-client.yml | 2 +- .../java/de/l3s/interweb/core/completion/Conversation.java | 7 ++++++- .../main/java/de/l3s/interweb/core/completion/Message.java | 7 ++++++- pom.xml | 6 +++--- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a6e1e73..15b1faf4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-java@v3 with: - java-version: '21-ea' + java-version: '21' distribution: 'temurin' cache: 'maven' diff --git a/.github/workflows/publish-client.yml b/.github/workflows/publish-client.yml index 17144f0c..27c6697c 100644 --- a/.github/workflows/publish-client.yml +++ b/.github/workflows/publish-client.yml @@ -20,7 +20,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '21-ea' + java-version: '21' distribution: 'temurin' cache: 'maven' diff --git a/interweb-core/src/main/java/de/l3s/interweb/core/completion/Conversation.java b/interweb-core/src/main/java/de/l3s/interweb/core/completion/Conversation.java index ffcae4ef..1613e0bd 100644 --- a/interweb-core/src/main/java/de/l3s/interweb/core/completion/Conversation.java +++ b/interweb-core/src/main/java/de/l3s/interweb/core/completion/Conversation.java @@ -1,5 +1,7 @@ package de.l3s.interweb.core.completion; +import java.io.Serial; +import java.io.Serializable; import java.time.Instant; import java.util.Objects; @@ -7,7 +9,10 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonPropertyOrder({"id", "title", "model", "messages", "used_tokens", "estimated_cost", "created"}) -public class Conversation extends CompletionQuery { +public class Conversation extends CompletionQuery implements Serializable { + @Serial + private static final long serialVersionUID = 7841527600165525951L; + @JsonProperty("title") private String title; diff --git a/interweb-core/src/main/java/de/l3s/interweb/core/completion/Message.java b/interweb-core/src/main/java/de/l3s/interweb/core/completion/Message.java index 28bfb9b4..6d37c9cd 100644 --- a/interweb-core/src/main/java/de/l3s/interweb/core/completion/Message.java +++ b/interweb-core/src/main/java/de/l3s/interweb/core/completion/Message.java @@ -1,5 +1,7 @@ package de.l3s.interweb.core.completion; +import java.io.Serial; +import java.io.Serializable; import java.time.Instant; import jakarta.validation.constraints.NotEmpty; @@ -12,7 +14,10 @@ @RegisterForReflection @JsonIgnoreProperties(ignoreUnknown = true) -public class Message { +public class Message implements Serializable { + @Serial + private static final long serialVersionUID = 7110951353515625780L; + public enum Role { system, user, diff --git a/pom.xml b/pom.xml index 652811e9..4c93433d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ true - 17 + 21 UTF-8 UTF-8 @@ -98,7 +98,7 @@ [3.8,) - [17,) + [21,) @@ -120,7 +120,7 @@ - + maven-source-plugin ${source-plugin.version}