chore: Bump version to 2.5.2 in pom.xml and remove redundant response validation in ChatCompletionClient

This commit is contained in:
extio-de
2026-03-23 22:50:36 +01:00
parent 229287e134
commit f753a7bdd7
2 changed files with 1 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>2.5.1</version> <version>2.5.2</version>
<properties> <properties>
<java.version>25</java.version> <java.version>25</java.version>

View File

@@ -198,9 +198,6 @@ public class ChatCompletionClient extends AbstractCompletionClient {
final var content = response.getChoices().getFirst().getMessage().getContent(); final var content = response.getChoices().getFirst().getMessage().getContent();
final var reasoning = response.getChoices().getFirst().getMessage().getReasoningContent(); final var reasoning = response.getChoices().getFirst().getMessage().getReasoningContent();
final var toolCalls = this.toToolCalls(response.getChoices().getFirst().getMessage().getToolCalls()); final var toolCalls = this.toToolCalls(response.getChoices().getFirst().getMessage().getToolCalls());
if ((content == null || content.isBlank()) && toolCalls.isEmpty()) {
throw new IllegalStateException("No parseable response content from server");
}
final var finishReason = this.mapFinishReason(choice.getFinishReason()); final var finishReason = this.mapFinishReason(choice.getFinishReason());
final var statistics = createCompletionStatistics(modelProfile, start, response.getUsage(), response.getTimings(), null, content, reasoning); final var statistics = createCompletionStatistics(modelProfile, start, response.getUsage(), response.getTimings(), null, content, reasoning);
return new Completion(content, reasoning, finishReason, statistics, toolCalls); return new Completion(content, reasoning, finishReason, statistics, toolCalls);