Package com.tnsai.planning.llm
Record Class LLMPlanStep
java.lang.Object
java.lang.Record
com.tnsai.planning.llm.LLMPlanStep
- Record Components:
stepIndex- zero-based position in the planactionName- the capability/tool name to invokedescription- human-readable description of what this step doesarguments- arguments to pass to the action/toolreasoning- LLM's reasoning for why this step is needed
public record LLMPlanStep(int stepIndex, String actionName, String description, Map<String,Object> arguments, String reasoning)
extends Record
A single step in an LLM-generated plan.
Each step maps a natural-language description to an executable action or tool call with specific arguments.
- Since:
- 0.3.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactionNamerecord component.Returns the value of theargumentsrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static LLMPlanStepCreates a simple step with just action name and description.static LLMPlanStepCreates a step with arguments.Returns the value of thereasoningrecord component.intReturns the value of thestepIndexrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LLMPlanStep
public LLMPlanStep(int stepIndex, String actionName, String description, Map<String, Object> arguments, String reasoning) Creates an instance of aLLMPlanSteprecord class.- Parameters:
stepIndex- the value for thestepIndexrecord componentactionName- the value for theactionNamerecord componentdescription- the value for thedescriptionrecord componentarguments- the value for theargumentsrecord componentreasoning- the value for thereasoningrecord component
-
-
Method Details
-
of
Creates a simple step with just action name and description. -
of
public static LLMPlanStep of(int index, String actionName, String description, Map<String, Object> arguments) Creates a step with arguments. -
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 '=='. -
stepIndex
public int stepIndex()Returns the value of thestepIndexrecord component.- Returns:
- the value of the
stepIndexrecord component
-
actionName
Returns the value of theactionNamerecord component.- Returns:
- the value of the
actionNamerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
reasoning
Returns the value of thereasoningrecord component.- Returns:
- the value of the
reasoningrecord component
-