bump version to 1.8.8 in pom.xml and update CompletionInterceptor interface to include conversation parameter in after method

This commit is contained in:
extio-de
2025-11-30 15:14:34 +01:00
parent 01dbd5c4db
commit a6087a0613
3 changed files with 4 additions and 4 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.7</version> <version>1.8.8</version>
<properties> <properties>
<java.version>21</java.version> <java.version>21</java.version>

View File

@@ -83,7 +83,7 @@ public class ClientService {
} }
var completion = this.client.conversation(modelProfile, conversation); var completion = this.client.conversation(modelProfile, conversation);
for (final var interceptor : this.completionInterceptors) { for (final var interceptor : this.completionInterceptors) {
completion = interceptor.after(modelProfile, completion); completion = interceptor.after(modelProfile, conversation, completion);
} }
return completion; return completion;
} }
@@ -96,7 +96,7 @@ public class ClientService {
} }
var completion = this.client.streamConversation(modelProfile, conversation, chunkConsumer); var completion = this.client.streamConversation(modelProfile, conversation, chunkConsumer);
for (final var interceptor : this.completionInterceptors) { for (final var interceptor : this.completionInterceptors) {
completion = interceptor.after(modelProfile, completion); completion = interceptor.after(modelProfile, conversation, completion);
} }
return completion; return completion;
} }

View File

@@ -6,6 +6,6 @@ public interface CompletionInterceptor {
Conversation before(ModelProfile modelProfile, Conversation conversation); Conversation before(ModelProfile modelProfile, Conversation conversation);
Completion after(ModelProfile modelProfile, Completion completion); Completion after(ModelProfile modelProfile, Conversation conversation, Completion completion);
} }