Package dev.langchain4j.agent.tool
Class ToolSpecification
-
- All Implemented Interfaces:
public class ToolSpecificationDescribes 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 classToolSpecification.BuilderToolSpecificationbuilder static inner class.
-
Method Summary
Modifier and Type Method Description Stringname()Returns the name of the tool. Stringdescription()Returns the description of the tool. JsonObjectSchemaparameters()Returns the parameters of the tool. ToolParameterstoolParameters()booleanequals(Object another)inthashCode()StringtoString()static ToolSpecification.Builderbuilder()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
-
-
-
-