com.github.tjake.jlama.net.openai.model.ChatCompletionTokenLogprobTopLogprobsInner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jlama-net Show documentation
Show all versions of jlama-net Show documentation
Jlama: A modern LLM inference engine for Java
/*
* OpenAI API
* The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
*
* The version of the OpenAPI document: 2.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.github.tjake.jlama.net.openai.model;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import jakarta.validation.constraints.*;
import jakarta.validation.Valid;
import org.hibernate.validator.constraints.*;
import com.github.tjake.jlama.net.openai.JSON;
/**
* ChatCompletionTokenLogprobTopLogprobsInner
*/
@JsonPropertyOrder({
ChatCompletionTokenLogprobTopLogprobsInner.JSON_PROPERTY_TOKEN,
ChatCompletionTokenLogprobTopLogprobsInner.JSON_PROPERTY_LOGPROB,
ChatCompletionTokenLogprobTopLogprobsInner.JSON_PROPERTY_BYTES
})
@JsonTypeName("ChatCompletionTokenLogprob_top_logprobs_inner")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ChatCompletionTokenLogprobTopLogprobsInner {
public static final String JSON_PROPERTY_TOKEN = "token";
private String token;
public static final String JSON_PROPERTY_LOGPROB = "logprob";
private BigDecimal logprob;
public static final String JSON_PROPERTY_BYTES = "bytes";
private List bytes;
public ChatCompletionTokenLogprobTopLogprobsInner() {
}
public ChatCompletionTokenLogprobTopLogprobsInner token(String token) {
this.token = token;
return this;
}
/**
* The token.
* @return token
*/
@jakarta.annotation.Nonnull
@NotNull
@JsonProperty(JSON_PROPERTY_TOKEN)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getToken() {
return token;
}
@JsonProperty(JSON_PROPERTY_TOKEN)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setToken(String token) {
this.token = token;
}
public ChatCompletionTokenLogprobTopLogprobsInner logprob(BigDecimal logprob) {
this.logprob = logprob;
return this;
}
/**
* The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.
* @return logprob
*/
@jakarta.annotation.Nonnull
@NotNull
@Valid
@JsonProperty(JSON_PROPERTY_LOGPROB)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public BigDecimal getLogprob() {
return logprob;
}
@JsonProperty(JSON_PROPERTY_LOGPROB)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setLogprob(BigDecimal logprob) {
this.logprob = logprob;
}
public ChatCompletionTokenLogprobTopLogprobsInner bytes(List bytes) {
this.bytes = bytes;
return this;
}
public ChatCompletionTokenLogprobTopLogprobsInner addBytesItem(Integer bytesItem) {
if (this.bytes == null) {
this.bytes = new ArrayList<>();
}
this.bytes.add(bytesItem);
return this;
}
/**
* A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
* @return bytes
*/
@jakarta.annotation.Nullable
@NotNull
@JsonProperty(JSON_PROPERTY_BYTES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getBytes() {
return bytes;
}
@JsonProperty(JSON_PROPERTY_BYTES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setBytes(List bytes) {
this.bytes = bytes;
}
/**
* Return true if this ChatCompletionTokenLogprob_top_logprobs_inner object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChatCompletionTokenLogprobTopLogprobsInner chatCompletionTokenLogprobTopLogprobsInner = (ChatCompletionTokenLogprobTopLogprobsInner) o;
return Objects.equals(this.token, chatCompletionTokenLogprobTopLogprobsInner.token) &&
Objects.equals(this.logprob, chatCompletionTokenLogprobTopLogprobsInner.logprob) &&
Objects.equals(this.bytes, chatCompletionTokenLogprobTopLogprobsInner.bytes);
}
@Override
public int hashCode() {
return Objects.hash(token, logprob, bytes);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChatCompletionTokenLogprobTopLogprobsInner {\n");
sb.append(" token: ").append(toIndentedString(token)).append("\n");
sb.append(" logprob: ").append(toIndentedString(logprob)).append("\n");
sb.append(" bytes: ").append(toIndentedString(bytes)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}