Package com.tnsai.planning.llm
Record Class CapabilityDescriptor
java.lang.Object
java.lang.Record
com.tnsai.planning.llm.CapabilityDescriptor
- Record Components:
name- unique capability identifierdescription- human-readable description of what this capability doesparameters- expected parameter names and their descriptions- tags for categorization
public record CapabilityDescriptor(String name, String description, Map<String,String> parameters, Set<String> tags)
extends Record
Describes an available capability (tool or action) for the LLM planner.
The LLM uses these descriptors to understand what actions are available when decomposing a goal into executable steps.
- Since:
- 0.3.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.name()Returns the value of thenamerecord component.static CapabilityDescriptorCreates a simple capability with name and description only.static CapabilityDescriptorCreates a capability with parameters.Returns the value of theparametersrecord component.tags()Returns the value of thetagsrecord component.Formats this capability for inclusion in an LLM prompt.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CapabilityDescriptor
public CapabilityDescriptor(String name, String description, Map<String, String> parameters, Set<String> tags) Creates an instance of aCapabilityDescriptorrecord class.- Parameters:
name- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentparameters- the value for theparametersrecord componenttags- the value for thetagsrecord component
-
-
Method Details
-
of
Creates a simple capability with name and description only. -
of
public static CapabilityDescriptor of(String name, String description, Map<String, String> parameters) Creates a capability with parameters. -
toPromptString
Formats this capability for inclusion in an LLM prompt. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-