bump version to 1.8.7 in pom.xml and add rewindTurn method to Conversation class

This commit is contained in:
extio-de
2025-11-23 21:52:23 +01:00
parent 5281666325
commit 01dbd5c4db
2 changed files with 10 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
<artifactId>lm-lib</artifactId> <artifactId>lm-lib</artifactId>
<groupId>de.extio</groupId> <groupId>de.extio</groupId>
<name>lm-lib</name> <name>lm-lib</name>
<version>1.8.6</version> <version>1.8.7</version>
<properties> <properties>
<java.version>21</java.version> <java.version>21</java.version>

View File

@@ -55,6 +55,15 @@ public final class Conversation {
} }
} }
public void rewindTurn() {
synchronized (this.conversation) {
if (this.conversation.size() > 1) {
this.conversation.removeLast();
this.conversation.removeLast();
}
}
}
public List<Turn> getConversation() { public List<Turn> getConversation() {
return Collections.unmodifiableList(this.conversation); return Collections.unmodifiableList(this.conversation);
} }