com.github.tjake.jlama.net.openai.model.ChatCompletionRequestMessageContentPartImage 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
The newest version!
/*
* 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 com.github.tjake.jlama.net.openai.model.ChatCompletionRequestMessageContentPartImageImageUrl;
import java.util.Arrays;
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;
/**
* ChatCompletionRequestMessageContentPartImage
*/
@JsonPropertyOrder({
ChatCompletionRequestMessageContentPartImage.JSON_PROPERTY_TYPE,
ChatCompletionRequestMessageContentPartImage.JSON_PROPERTY_IMAGE_URL
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ChatCompletionRequestMessageContentPartImage {
/**
* The type of the content part.
*/
public enum TypeEnum {
IMAGE_URL("image_url");
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;
public static final String JSON_PROPERTY_IMAGE_URL = "image_url";
private ChatCompletionRequestMessageContentPartImageImageUrl imageUrl;
public ChatCompletionRequestMessageContentPartImage() {
}
public ChatCompletionRequestMessageContentPartImage type(TypeEnum type) {
this.type = type;
return this;
}
/**
* The type of the content part.
* @return type
*/
@jakarta.annotation.Nonnull
@NotNull
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public TypeEnum getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setType(TypeEnum type) {
this.type = type;
}
public ChatCompletionRequestMessageContentPartImage imageUrl(ChatCompletionRequestMessageContentPartImageImageUrl imageUrl) {
this.imageUrl = imageUrl;
return this;
}
/**
* Get imageUrl
* @return imageUrl
*/
@jakarta.annotation.Nonnull
@NotNull
@Valid
@JsonProperty(JSON_PROPERTY_IMAGE_URL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ChatCompletionRequestMessageContentPartImageImageUrl getImageUrl() {
return imageUrl;
}
@JsonProperty(JSON_PROPERTY_IMAGE_URL)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setImageUrl(ChatCompletionRequestMessageContentPartImageImageUrl imageUrl) {
this.imageUrl = imageUrl;
}
/**
* Return true if this ChatCompletionRequestMessageContentPartImage object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChatCompletionRequestMessageContentPartImage chatCompletionRequestMessageContentPartImage = (ChatCompletionRequestMessageContentPartImage) o;
return Objects.equals(this.type, chatCompletionRequestMessageContentPartImage.type) &&
Objects.equals(this.imageUrl, chatCompletionRequestMessageContentPartImage.imageUrl);
}
@Override
public int hashCode() {
return Objects.hash(type, imageUrl);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChatCompletionRequestMessageContentPartImage {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).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 ");
}
}