chore: Bump version to 2.5.2 in pom.xml and remove redundant response validation in ChatCompletionClient
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -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>
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user