Convert spaces to tabs

This commit is contained in:
extio-de
2025-12-13 15:26:38 +01:00
parent a41e5cf7b5
commit d2f5c46847
18 changed files with 1479 additions and 1479 deletions

View File

@@ -2,19 +2,19 @@ package de.extio.lmlib.client;
public enum CompletionFinishReason {
/**
* Regular completion
*/
DONE,
/**
* Regular completion
*/
DONE,
/**
* Completion was stopped because the token limit was reached. You may continue the conversation.
*/
TOKEN_LIMIT_REACHED,
/**
* Completion was stopped because the token limit was reached. You may continue the conversation.
*/
TOKEN_LIMIT_REACHED,
/**
* Completion was stopped because the content was filtered.
*/
CONTENT_FILTERED
/**
* Completion was stopped because the content was filtered.
*/
CONTENT_FILTERED
}

View File

@@ -2,10 +2,10 @@ package de.extio.lmlib.client.oai.completion;
public final class FinishReasons {
public static final String FINISH_REASON_STOP = "stop";
public static final String FINISH_REASON_STOP = "stop";
public static final String FINISH_REASON_LENGTH = "length";
public static final String FINISH_REASON_CONTENT_FILTER = "content_filter";
}

View File

@@ -4,14 +4,14 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public class StreamOptions {
protected boolean includeUsage;
protected boolean includeUsage;
@JsonProperty("include_usage")
public boolean isIncludeUsage() {
return includeUsage;
}
@JsonProperty("include_usage")
public boolean isIncludeUsage() {
return includeUsage;
}
public void setIncludeUsage(final boolean includeUsage) {
this.includeUsage = includeUsage;
}
public void setIncludeUsage(final boolean includeUsage) {
this.includeUsage = includeUsage;
}
}

View File

@@ -3,109 +3,109 @@ package de.extio.lmlib.client.oai.completion;
import com.fasterxml.jackson.annotation.JsonProperty;
public final class Timings {
private int cacheN;
private int predictedN;
private double predictedMs;
private double predictedPerTokenMs;
private double predictedPerSecond;
private int promptN;
private double promptMs;
private double promptPerTokenMs;
private double promptPerSecond;
@JsonProperty("cache_n")
public int getCacheN() {
return this.cacheN;
}
public void setCacheN(final int cacheN) {
this.cacheN = cacheN;
}
@JsonProperty("predicted_n")
public int getPredictedN() {
return this.predictedN;
}
public void setPredictedN(final int predictedN) {
this.predictedN = predictedN;
}
@JsonProperty("predicted_ms")
public double getPredictedMs() {
return this.predictedMs;
}
public void setPredictedMs(final double predictedMs) {
this.predictedMs = predictedMs;
}
@JsonProperty("predicted_per_token_ms")
public double getPredictedPerTokenMs() {
return this.predictedPerTokenMs;
}
public void setPredictedPerTokenMs(final double predictedPerTokenMs) {
this.predictedPerTokenMs = predictedPerTokenMs;
}
@JsonProperty("predicted_per_second")
public double getPredictedPerSecond() {
return this.predictedPerSecond;
}
public void setPredictedPerSecond(final double predictedPerSecond) {
this.predictedPerSecond = predictedPerSecond;
}
@JsonProperty("prompt_n")
public int getPromptN() {
return this.promptN;
}
public void setPromptN(final int promptN) {
this.promptN = promptN;
}
@JsonProperty("prompt_ms")
public double getPromptMs() {
return this.promptMs;
}
public void setPromptMs(final double promptMs) {
this.promptMs = promptMs;
}
@JsonProperty("prompt_per_token_ms")
public double getPromptPerTokenMs() {
return this.promptPerTokenMs;
}
public void setPromptPerTokenMs(final double promptPerTokenMs) {
this.promptPerTokenMs = promptPerTokenMs;
}
@JsonProperty("prompt_per_second")
public double getPromptPerSecond() {
return this.promptPerSecond;
}
public void setPromptPerSecond(final double promptPerSecond) {
this.promptPerSecond = promptPerSecond;
}
@Override
public String toString() {
return "Timings [cacheN=" + this.cacheN + ", predictedN=" + this.predictedN + ", predictedMs=" + this.predictedMs + ", predictedPerTokenMs=" + this.predictedPerTokenMs + ", predictedPerSecond=" + this.predictedPerSecond + ", promptN=" + this.promptN + ", promptMs=" + this.promptMs + ", promptPerTokenMs=" + this.promptPerTokenMs + ", promptPerSecond=" + this.promptPerSecond + "]";
}
private int cacheN;
private int predictedN;
private double predictedMs;
private double predictedPerTokenMs;
private double predictedPerSecond;
private int promptN;
private double promptMs;
private double promptPerTokenMs;
private double promptPerSecond;
@JsonProperty("cache_n")
public int getCacheN() {
return this.cacheN;
}
public void setCacheN(final int cacheN) {
this.cacheN = cacheN;
}
@JsonProperty("predicted_n")
public int getPredictedN() {
return this.predictedN;
}
public void setPredictedN(final int predictedN) {
this.predictedN = predictedN;
}
@JsonProperty("predicted_ms")
public double getPredictedMs() {
return this.predictedMs;
}
public void setPredictedMs(final double predictedMs) {
this.predictedMs = predictedMs;
}
@JsonProperty("predicted_per_token_ms")
public double getPredictedPerTokenMs() {
return this.predictedPerTokenMs;
}
public void setPredictedPerTokenMs(final double predictedPerTokenMs) {
this.predictedPerTokenMs = predictedPerTokenMs;
}
@JsonProperty("predicted_per_second")
public double getPredictedPerSecond() {
return this.predictedPerSecond;
}
public void setPredictedPerSecond(final double predictedPerSecond) {
this.predictedPerSecond = predictedPerSecond;
}
@JsonProperty("prompt_n")
public int getPromptN() {
return this.promptN;
}
public void setPromptN(final int promptN) {
this.promptN = promptN;
}
@JsonProperty("prompt_ms")
public double getPromptMs() {
return this.promptMs;
}
public void setPromptMs(final double promptMs) {
this.promptMs = promptMs;
}
@JsonProperty("prompt_per_token_ms")
public double getPromptPerTokenMs() {
return this.promptPerTokenMs;
}
public void setPromptPerTokenMs(final double promptPerTokenMs) {
this.promptPerTokenMs = promptPerTokenMs;
}
@JsonProperty("prompt_per_second")
public double getPromptPerSecond() {
return this.promptPerSecond;
}
public void setPromptPerSecond(final double promptPerSecond) {
this.promptPerSecond = promptPerSecond;
}
@Override
public String toString() {
return "Timings [cacheN=" + this.cacheN + ", predictedN=" + this.predictedN + ", predictedMs=" + this.predictedMs + ", predictedPerTokenMs=" + this.predictedPerTokenMs + ", predictedPerSecond=" + this.predictedPerSecond + ", promptN=" + this.promptN + ", promptMs=" + this.promptMs + ", promptPerTokenMs=" + this.promptPerTokenMs + ", promptPerSecond=" + this.promptPerSecond + "]";
}
}

View File

@@ -3,121 +3,121 @@ package de.extio.lmlib.client.oai.completion;
import com.fasterxml.jackson.annotation.JsonProperty;
public final class Usage {
private int completionTokens;
private int promptTokens;
private int totalTokens;
private InputTokensDetails inputTokensDetails;
private OutputTokensDetails outputTokensDetails;
@JsonProperty("completion_tokens")
public int getCompletionTokens() {
return this.completionTokens;
}
public void setCompletionTokens(final int completionTokens) {
this.completionTokens = completionTokens;
}
@JsonProperty("output_tokens")
public void setOutputTokens(final int outputTokens) {
this.completionTokens = outputTokens;
}
@JsonProperty("prompt_tokens")
public int getPromptTokens() {
return this.promptTokens;
}
public void setPromptTokens(final int promptTokens) {
this.promptTokens = promptTokens;
}
@JsonProperty("input_tokens")
public void setInputTokens(final int inputTokens) {
this.promptTokens = inputTokens;
}
@JsonProperty("total_tokens")
public int getTotalTokens() {
return this.totalTokens;
}
public void setTotalTokens(final int totalTokens) {
this.totalTokens = totalTokens;
}
@JsonProperty("input_tokens_details")
public InputTokensDetails getInputTokensDetails() {
return this.inputTokensDetails;
}
public void setInputTokensDetails(final InputTokensDetails inputTokensDetails) {
this.inputTokensDetails = inputTokensDetails;
}
@JsonProperty("output_tokens_details")
public OutputTokensDetails getOutputTokensDetails() {
return this.outputTokensDetails;
}
public void setOutputTokensDetails(final OutputTokensDetails outputTokensDetails) {
this.outputTokensDetails = outputTokensDetails;
}
public int getCachedTokens() {
return this.inputTokensDetails != null ? this.inputTokensDetails.getCachedTokens() : 0;
}
public int getReasoningTokens() {
return this.outputTokensDetails != null ? this.outputTokensDetails.getReasoningTokens() : 0;
}
@Override
public String toString() {
return "Usage [completionTokens=" + this.completionTokens + ", promptTokens=" + this.promptTokens + ", totalTokens=" + this.totalTokens + ", inputTokensDetails=" + this.inputTokensDetails + ", outputTokensDetails=" + this.outputTokensDetails + "]";
}
public static final class InputTokensDetails {
private int cachedTokens;
@JsonProperty("cached_tokens")
public int getCachedTokens() {
return this.cachedTokens;
}
public void setCachedTokens(final int cachedTokens) {
this.cachedTokens = cachedTokens;
}
@Override
public String toString() {
return "InputTokensDetails [cachedTokens=" + this.cachedTokens + "]";
}
}
public static final class OutputTokensDetails {
private int reasoningTokens;
@JsonProperty("reasoning_tokens")
public int getReasoningTokens() {
return this.reasoningTokens;
}
public void setReasoningTokens(final int reasoningTokens) {
this.reasoningTokens = reasoningTokens;
}
@Override
public String toString() {
return "OutputTokensDetails [reasoningTokens=" + this.reasoningTokens + "]";
}
}
private int completionTokens;
private int promptTokens;
private int totalTokens;
private InputTokensDetails inputTokensDetails;
private OutputTokensDetails outputTokensDetails;
@JsonProperty("completion_tokens")
public int getCompletionTokens() {
return this.completionTokens;
}
public void setCompletionTokens(final int completionTokens) {
this.completionTokens = completionTokens;
}
@JsonProperty("output_tokens")
public void setOutputTokens(final int outputTokens) {
this.completionTokens = outputTokens;
}
@JsonProperty("prompt_tokens")
public int getPromptTokens() {
return this.promptTokens;
}
public void setPromptTokens(final int promptTokens) {
this.promptTokens = promptTokens;
}
@JsonProperty("input_tokens")
public void setInputTokens(final int inputTokens) {
this.promptTokens = inputTokens;
}
@JsonProperty("total_tokens")
public int getTotalTokens() {
return this.totalTokens;
}
public void setTotalTokens(final int totalTokens) {
this.totalTokens = totalTokens;
}
@JsonProperty("input_tokens_details")
public InputTokensDetails getInputTokensDetails() {
return this.inputTokensDetails;
}
public void setInputTokensDetails(final InputTokensDetails inputTokensDetails) {
this.inputTokensDetails = inputTokensDetails;
}
@JsonProperty("output_tokens_details")
public OutputTokensDetails getOutputTokensDetails() {
return this.outputTokensDetails;
}
public void setOutputTokensDetails(final OutputTokensDetails outputTokensDetails) {
this.outputTokensDetails = outputTokensDetails;
}
public int getCachedTokens() {
return this.inputTokensDetails != null ? this.inputTokensDetails.getCachedTokens() : 0;
}
public int getReasoningTokens() {
return this.outputTokensDetails != null ? this.outputTokensDetails.getReasoningTokens() : 0;
}
@Override
public String toString() {
return "Usage [completionTokens=" + this.completionTokens + ", promptTokens=" + this.promptTokens + ", totalTokens=" + this.totalTokens + ", inputTokensDetails=" + this.inputTokensDetails + ", outputTokensDetails=" + this.outputTokensDetails + "]";
}
public static final class InputTokensDetails {
private int cachedTokens;
@JsonProperty("cached_tokens")
public int getCachedTokens() {
return this.cachedTokens;
}
public void setCachedTokens(final int cachedTokens) {
this.cachedTokens = cachedTokens;
}
@Override
public String toString() {
return "InputTokensDetails [cachedTokens=" + this.cachedTokens + "]";
}
}
public static final class OutputTokensDetails {
private int reasoningTokens;
@JsonProperty("reasoning_tokens")
public int getReasoningTokens() {
return this.reasoningTokens;
}
public void setReasoningTokens(final int reasoningTokens) {
this.reasoningTokens = reasoningTokens;
}
@Override
public String toString() {
return "OutputTokensDetails [reasoningTokens=" + this.reasoningTokens + "]";
}
}
}

View File

@@ -3,46 +3,46 @@ package de.extio.lmlib.client.oai.completion.chat;
import com.fasterxml.jackson.annotation.JsonProperty;
final class ChatMessage {
private String role;
private String content;
private String reasoningContent;
public ChatMessage() {
}
public ChatMessage(final String role, final String content, final String reasoningContent) {
this.role = role;
this.content = content;
this.reasoningContent = reasoningContent;
}
@JsonProperty("role")
public String getRole() {
return role;
}
public void setRole(final String role) {
this.role = role;
}
@JsonProperty("content")
public String getContent() {
return content;
}
public void setContent(final String content) {
this.content = content;
}
@JsonProperty("reasoning_content")
public String getReasoningContent() {
return reasoningContent;
}
public void setReasoningContent(final String reasoningContent) {
this.reasoningContent = reasoningContent;
}
private String role;
private String content;
private String reasoningContent;
public ChatMessage() {
}
public ChatMessage(final String role, final String content, final String reasoningContent) {
this.role = role;
this.content = content;
this.reasoningContent = reasoningContent;
}
@JsonProperty("role")
public String getRole() {
return role;
}
public void setRole(final String role) {
this.role = role;
}
@JsonProperty("content")
public String getContent() {
return content;
}
public void setContent(final String content) {
this.content = content;
}
@JsonProperty("reasoning_content")
public String getReasoningContent() {
return reasoningContent;
}
public void setReasoningContent(final String reasoningContent) {
this.reasoningContent = reasoningContent;
}
}