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 inputSchema)
extends Record
implements ToolDefinition
Default implementation of
ToolDefinition.- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDefaultToolDefinition(String name, String description, String inputSchema) Creates an instance of aDefaultToolDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a defaultToolDefinitionbuilder.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.Returns the value of theinputSchemarecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DefaultToolDefinition
Creates an instance of aDefaultToolDefinitionrecord class.- Parameters:
name- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentinputSchema- the value for theinputSchemarecord component
-
-
Method Details
-
builder
Description copied from interface:ToolDefinitionCreate a defaultToolDefinitionbuilder. -
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.- Specified by:
namein interfaceToolDefinition- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceToolDefinition- Returns:
- the value of the
descriptionrecord component
-
inputSchema
Returns the value of theinputSchemarecord component.- Specified by:
inputSchemain interfaceToolDefinition- Returns:
- the value of the
inputSchemarecord component
-