Package dev.langchain4j.agent.tool
Class ToolParameters
java.lang.Object
dev.langchain4j.agent.tool.ToolParameters
Deprecated, for removal: This API element is subject to removal in a future version.
Represents the parameters of a tool.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDeprecated, for removal: This API element is subject to removal in a future version.ToolParametersbuilder static inner class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolParameters.Builderbuilder()Deprecated, for removal: This API element is subject to removal in a future version.please useJsonObjectSchema.builder()insteadbooleanDeprecated, for removal: This API element is subject to removal in a future version.inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the properties of the tool.required()Deprecated, for removal: This API element is subject to removal in a future version.Returns the required properties of the tool.toString()Deprecated, for removal: This API element is subject to removal in a future version.type()Deprecated, for removal: This API element is subject to removal in a future version.Returns the type of the tool.
-
Method Details
-
type
Deprecated, for removal: This API element is subject to removal in a future version.Returns the type of the tool.- Returns:
- the type of the tool.
-
properties
Deprecated, for removal: This API element is subject to removal in a future version.Returns the properties of the tool.- Returns:
- the properties of the tool.
-
required
Deprecated, for removal: This API element is subject to removal in a future version.Returns the required properties of the tool.- Returns:
- the required properties of the tool.
-
equals
Deprecated, for removal: This API element is subject to removal in a future version. -
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version. -
toString
Deprecated, for removal: This API element is subject to removal in a future version. -
builder
Deprecated, for removal: This API element is subject to removal in a future version.please useJsonObjectSchema.builder()insteadToolParameters builder static inner class.- Returns:
- a
ToolParameters.Builder.
-
JsonObjectSchemaAPI instead to define the schema for tool parameters. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();