230 lines
5.9 KiB
Java
230 lines
5.9 KiB
Java
package com.muse.dto;
|
|
|
|
import java.net.URI;
|
|
import java.util.Objects;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
|
import org.springframework.lang.Nullable;
|
|
import java.io.Serializable;
|
|
import java.time.OffsetDateTime;
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.constraints.*;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
|
|
import java.util.*;
|
|
import jakarta.annotation.Generated;
|
|
|
|
/**
|
|
* 用户本次希望 AI 编排完成的任务意图,不携带上下文事实。
|
|
*/
|
|
|
|
@Schema(name = "AiTaskIntent", description = "用户本次希望 AI 编排完成的任务意图,不携带上下文事实。")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T16:47:40.290595+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class AiTaskIntent implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 任务意图类型
|
|
*/
|
|
public enum KindEnum {
|
|
GENERATION("generation"),
|
|
|
|
CONTINUATION("continuation"),
|
|
|
|
EXPANSION("expansion"),
|
|
|
|
POLISH("polish"),
|
|
|
|
DETECTION("detection"),
|
|
|
|
PLANNING("planning");
|
|
|
|
private final String value;
|
|
|
|
KindEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static KindEnum fromValue(String value) {
|
|
for (KindEnum b : KindEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private KindEnum kind;
|
|
|
|
private @Nullable String userInstruction;
|
|
|
|
/**
|
|
* 期望输出落点,实际落点由服务端根据任务类型和权限决定。
|
|
*/
|
|
public enum OutputTargetEnum {
|
|
SUGGESTION("suggestion"),
|
|
|
|
PLANNING_CANDIDATE("planning_candidate"),
|
|
|
|
EVALUATION_REPORT("evaluation_report"),
|
|
|
|
SHADOW_CANDIDATE("shadow_candidate");
|
|
|
|
private final String value;
|
|
|
|
OutputTargetEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static OutputTargetEnum fromValue(String value) {
|
|
for (OutputTargetEnum b : OutputTargetEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private OutputTargetEnum outputTarget = OutputTargetEnum.SUGGESTION;
|
|
|
|
public AiTaskIntent() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public AiTaskIntent(KindEnum kind) {
|
|
this.kind = kind;
|
|
}
|
|
|
|
public AiTaskIntent kind(KindEnum kind) {
|
|
this.kind = kind;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 任务意图类型
|
|
* @return kind
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "kind", description = "任务意图类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("kind")
|
|
public KindEnum getKind() {
|
|
return kind;
|
|
}
|
|
|
|
@JsonProperty("kind")
|
|
public void setKind(KindEnum kind) {
|
|
this.kind = kind;
|
|
}
|
|
|
|
public AiTaskIntent userInstruction(@Nullable String userInstruction) {
|
|
this.userInstruction = userInstruction;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 用户补充指令;只能表达意图,不能作为已授权上下文事实。
|
|
* @return userInstruction
|
|
*/
|
|
@Size(max = 4000)
|
|
@Schema(name = "userInstruction", description = "用户补充指令;只能表达意图,不能作为已授权上下文事实。", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("userInstruction")
|
|
public @Nullable String getUserInstruction() {
|
|
return userInstruction;
|
|
}
|
|
|
|
@JsonProperty("userInstruction")
|
|
public void setUserInstruction(@Nullable String userInstruction) {
|
|
this.userInstruction = userInstruction;
|
|
}
|
|
|
|
public AiTaskIntent outputTarget(OutputTargetEnum outputTarget) {
|
|
this.outputTarget = outputTarget;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 期望输出落点,实际落点由服务端根据任务类型和权限决定。
|
|
* @return outputTarget
|
|
*/
|
|
|
|
@Schema(name = "outputTarget", description = "期望输出落点,实际落点由服务端根据任务类型和权限决定。", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("outputTarget")
|
|
public OutputTargetEnum getOutputTarget() {
|
|
return outputTarget;
|
|
}
|
|
|
|
@JsonProperty("outputTarget")
|
|
public void setOutputTarget(OutputTargetEnum outputTarget) {
|
|
this.outputTarget = outputTarget;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
AiTaskIntent aiTaskIntent = (AiTaskIntent) o;
|
|
return Objects.equals(this.kind, aiTaskIntent.kind) &&
|
|
Objects.equals(this.userInstruction, aiTaskIntent.userInstruction) &&
|
|
Objects.equals(this.outputTarget, aiTaskIntent.outputTarget);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(kind, userInstruction, outputTarget);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AiTaskIntent {\n");
|
|
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
|
|
sb.append(" userInstruction: ").append(toIndentedString(userInstruction)).append("\n");
|
|
sb.append(" outputTarget: ").append(toIndentedString(outputTarget)).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(@Nullable Object o) {
|
|
return o == null ? "null" : o.toString().replace("\n", "\n ");
|
|
}
|
|
}
|
|
|