Record Class PlanningResult
java.lang.Object
java.lang.Record
io.jmix.dynmodelai.agent.planning.PlanningResult
public record PlanningResult(PlanningStatus status, @Nullable ValidatedPlan plan, List<HumanQuestion> questions, String message, @Nullable String detail, boolean repairable)
extends Record
Validated planner outcome consumed by the Engine graph.
message is what the user reads. detail keeps the technical reason of a failure
or timeout, such as the validator's rejection or the provider's error, and is null otherwise.
repairable explicitly distinguishes rejected model output from terminal failures;
the graph also checks the remaining attempt budget before requesting a correction.
-
Constructor Summary
ConstructorsConstructorDescriptionPlanningResult(PlanningStatus status, @Nullable ValidatedPlan plan, List<HumanQuestion> questions, String message) PlanningResult(PlanningStatus status, @Nullable ValidatedPlan plan, List<HumanQuestion> questions, String message, @Nullable String detail) PlanningResult(PlanningStatus status, @Nullable ValidatedPlan plan, List<HumanQuestion> questions, String message, @Nullable String detail, boolean repairable) Creates an instance of aPlanningResultrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringdetail()Returns the value of thedetailrecord component.final booleanIndicates whether some other object is "equal to" this one.static PlanningResultfinal inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.@Nullable ValidatedPlanplan()Returns the value of theplanrecord component.Returns the value of thequestionsrecord component.static PlanningResultInvalid model output that may be corrected within the graph's remaining attempt budget.booleanReturns the value of therepairablerecord component.status()Returns the value of thestatusrecord component.static PlanningResultfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlanningResult
public PlanningResult(PlanningStatus status, @Nullable ValidatedPlan plan, List<HumanQuestion> questions, String message, @Nullable String detail, boolean repairable) Creates an instance of aPlanningResultrecord class.- Parameters:
status- the value for thestatusrecord componentplan- the value for theplanrecord componentquestions- the value for thequestionsrecord componentmessage- the value for themessagerecord componentdetail- the value for thedetailrecord componentrepairable- the value for therepairablerecord component
-
PlanningResult
public PlanningResult(PlanningStatus status, @Nullable ValidatedPlan plan, List<HumanQuestion> questions, String message, @Nullable String detail) -
PlanningResult
public PlanningResult(PlanningStatus status, @Nullable ValidatedPlan plan, List<HumanQuestion> questions, String message)
-
-
Method Details
-
failed
-
rejected
Invalid model output that may be corrected within the graph's remaining attempt budget. -
timedOut
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
plan
Returns the value of theplanrecord component.- Returns:
- the value of the
planrecord component
-
questions
Returns the value of thequestionsrecord component.- Returns:
- the value of the
questionsrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
detail
Returns the value of thedetailrecord component.- Returns:
- the value of the
detailrecord component
-
repairable
public boolean repairable()Returns the value of therepairablerecord component.- Returns:
- the value of the
repairablerecord component
-