Record Class DefaultToolDefinition
java.lang.Object
java.lang.Record
org.springframework.ai.tool.definition.DefaultToolDefinition
- All Implemented Interfaces:
ToolDefinition
public record DefaultToolDefinition(String name, String description, String inputTypeSchema)
extends Record
implements ToolDefinition
Default implementation of
ToolDefinition
.- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionDefaultToolDefinition
(String name, String description, String inputTypeSchema) Creates an instance of aDefaultToolDefinition
record class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a defaultToolDefinition
builder.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinputTypeSchema
record component.name()
Returns the value of thename
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DefaultToolDefinition
Creates an instance of aDefaultToolDefinition
record class.- Parameters:
name
- the value for thename
record componentdescription
- the value for thedescription
record componentinputTypeSchema
- the value for theinputTypeSchema
record component
-
-
Method Details
-
builder
Description copied from interface:ToolDefinition
Create a defaultToolDefinition
builder. -
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 thename
record component.- Specified by:
name
in interfaceToolDefinition
- Returns:
- the value of the
name
record component
-
description
Returns the value of thedescription
record component.- Specified by:
description
in interfaceToolDefinition
- Returns:
- the value of the
description
record component
-
inputTypeSchema
Returns the value of theinputTypeSchema
record component.- Specified by:
inputTypeSchema
in interfaceToolDefinition
- Returns:
- the value of the
inputTypeSchema
record component
-