Package dev.langchain4j.agent.tool
Class ToolSpecification
-
- All Implemented Interfaces:
public class ToolSpecification
Describes a tool that language model can execute.
Can be generated automatically from methods annotated with Tool using ToolSpecifications helper.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ToolSpecification.Builder
ToolSpecification
builder static inner class.
-
Method Summary
Modifier and Type Method Description String
name()
Returns the name of the tool. String
description()
Returns the description of the tool. JsonObjectSchema
parameters()
Returns the parameters of the tool. ToolParameters
toolParameters()
boolean
equals(Object another)
int
hashCode()
String
toString()
static ToolSpecification.Builder
builder()
Creates builder to build ToolSpecification. -
-
Method Detail
-
description
String description()
Returns the description of the tool.
- Returns:
the description of the tool.
-
parameters
JsonObjectSchema parameters()
Returns the parameters of the tool.
The old method that returns the deprecated ToolParameters has been renamed to toolParameters.
-
toolParameters
@Deprecated(forRemoval = true) ToolParameters toolParameters()
-
hashCode
int hashCode()
-
builder
static ToolSpecification.Builder builder()
Creates builder to build ToolSpecification.
- Returns:
created builder
-
-
-
-