Package com.tnsai.planning.llm
Record Class PlanExecutionResult
java.lang.Object
java.lang.Record
com.tnsai.planning.llm.PlanExecutionResult
- Record Components:
plan- the original planstepResults- per-step resultssuccess- whether all steps succeededreplanCount- number of replans that occurred
public record PlanExecutionResult(LLMPlan plan, List<StepExecutionResult> stepResults, boolean success, int replanCount)
extends Record
Result of executing an entire LLM-generated plan.
- Since:
- 0.3.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPlanExecutionResult(LLMPlan plan, List<StepExecutionResult> stepResults, boolean success, int replanCount) Creates an instance of aPlanExecutionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of successfully executed steps.final booleanIndicates whether some other object is "equal to" this one.intReturns the number of failed steps.final inthashCode()Returns a hash code value for this object.plan()Returns the value of theplanrecord component.intReturns the value of thereplanCountrecord component.Returns the value of thestepResultsrecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.intReturns the total number of steps attempted.
-
Constructor Details
-
PlanExecutionResult
public PlanExecutionResult(LLMPlan plan, List<StepExecutionResult> stepResults, boolean success, int replanCount) Creates an instance of aPlanExecutionResultrecord class.- Parameters:
plan- the value for theplanrecord componentstepResults- the value for thestepResultsrecord componentsuccess- the value for thesuccessrecord componentreplanCount- the value for thereplanCountrecord component
-
-
Method Details
-
completedCount
public int completedCount()Returns the number of successfully executed steps. -
failedCount
public int failedCount()Returns the number of failed steps. -
totalSteps
public int totalSteps()Returns the total number of steps attempted. -
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 '=='. -
plan
Returns the value of theplanrecord component.- Returns:
- the value of the
planrecord component
-
stepResults
Returns the value of thestepResultsrecord component.- Returns:
- the value of the
stepResultsrecord component
-
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
replanCount
public int replanCount()Returns the value of thereplanCountrecord component.- Returns:
- the value of the
replanCountrecord component
-