com.github.tjake.jlama.net.openai.model.ChatCompletionRequestSystemMessage Maven / Gradle / Ivy
/*
* 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.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;
/**
* ChatCompletionRequestSystemMessage
*/
@JsonPropertyOrder({
ChatCompletionRequestSystemMessage.JSON_PROPERTY_CONTENT,
ChatCompletionRequestSystemMessage.JSON_PROPERTY_ROLE,
ChatCompletionRequestSystemMessage.JSON_PROPERTY_NAME
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0")
public class ChatCompletionRequestSystemMessage {
public static final String JSON_PROPERTY_CONTENT = "content";
private String content;
public static final String JSON_PROPERTY_ROLE = "role";
private String role = "system";
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public ChatCompletionRequestSystemMessage() {
}
public ChatCompletionRequestSystemMessage content(String content) {
this.content = content;
return this;
}
/**
* The contents of the system message.
* @return content
*/
@jakarta.annotation.Nonnull
@NotNull
@JsonProperty(JSON_PROPERTY_CONTENT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getContent() {
return content;
}
@JsonProperty(JSON_PROPERTY_CONTENT)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setContent(String content) {
this.content = content;
}
public ChatCompletionRequestSystemMessage role(String role) {
this.role = role;
return this;
}
/**
* The role of the messages author, in this case `system`.
* @return role
*/
@jakarta.annotation.Nonnull
@NotNull
@JsonProperty(JSON_PROPERTY_ROLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getRole() {
return role;
}
@JsonProperty(JSON_PROPERTY_ROLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setRole(String role) {
this.role = role;
}
public ChatCompletionRequestSystemMessage name(String name) {
this.name = name;
return this;
}
/**
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
* @return name
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
/**
* Return true if this ChatCompletionRequestSystemMessage object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChatCompletionRequestSystemMessage chatCompletionRequestSystemMessage = (ChatCompletionRequestSystemMessage) o;
return Objects.equals(this.content, chatCompletionRequestSystemMessage.content) &&
Objects.equals(this.role, chatCompletionRequestSystemMessage.role) &&
Objects.equals(this.name, chatCompletionRequestSystemMessage.name);
}
@Override
public int hashCode() {
return Objects.hash(content, role, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ChatCompletionRequestSystemMessage {\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" role: ").append(toIndentedString(role)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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 ");
}
}