Package dev.langchain4j.agent.tool
Class ToolSpecification
java.lang.Object
dev.langchain4j.agent.tool.ToolSpecification
Describes a tool that language model can execute.
Can be generated automatically from methods annotated with Tool
using ToolSpecifications
helper.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
ToolSpecification
builder static inner class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolSpecification.Builder
builder()
Creates builder to buildToolSpecification
.Returns the description of the tool.boolean
int
hashCode()
name()
Returns the name of the tool.Returns the parameters of the tool.Deprecated, for removal: This API element is subject to removal in a future version.toString()
-
Method Details
-
name
Returns the name of the tool.- Returns:
- the name of the tool.
-
description
Returns the description of the tool.- Returns:
- the description of the tool.
-
parameters
Returns the parameters of the tool.The old method that returns the deprecated
ToolParameters
has been renamed totoolParameters()
. -
toolParameters
Deprecated, for removal: This API element is subject to removal in a future version.please useparameters()
instead -
equals
-
hashCode
public int hashCode() -
toString
-
builder
Creates builder to buildToolSpecification
.- Returns:
- created builder
-
parameters()
instead