类 ToolSpecification.Builder
java.lang.Object
dev.langchain4j.agent.tool.ToolSpecification.Builder
- 封闭类:
- ToolSpecification
ToolSpecification builder static inner class.-
方法概要
修饰符和类型方法说明addOptionalParameter(String name, JsonSchemaProperty... jsonSchemaProperties) Adds an optional parameter to the tool.addOptionalParameter(String name, Iterable<JsonSchemaProperty> jsonSchemaProperties) Adds an optional parameter to the tool.addParameter(String name, JsonSchemaProperty... jsonSchemaProperties) Adds a parameter to the tool.addParameter(String name, Iterable<JsonSchemaProperty> jsonSchemaProperties) Adds a parameter to the tool.build()Returns aToolSpecificationbuilt from the parameters previously set.description(String description) Sets thedescription.Sets thename.parameters(ToolParameters parameters) Sets theparameters.
-
方法详细资料
-
name
Sets thename.- 参数:
name- thename- 返回:
this
-
description
Sets thedescription.- 参数:
description- thedescription- 返回:
this
-
parameters
Sets theparameters.- 参数:
parameters- theparameters- 返回:
this
-
addParameter
public ToolSpecification.Builder addParameter(String name, JsonSchemaProperty... jsonSchemaProperties) Adds a parameter to the tool.- 参数:
name- the name of the parameter.jsonSchemaProperties- the properties of the parameter.- 返回:
this
-
addParameter
public ToolSpecification.Builder addParameter(String name, Iterable<JsonSchemaProperty> jsonSchemaProperties) Adds a parameter to the tool.- 参数:
name- the name of the parameter.jsonSchemaProperties- the properties of the parameter.- 返回:
this
-
addOptionalParameter
public ToolSpecification.Builder addOptionalParameter(String name, JsonSchemaProperty... jsonSchemaProperties) Adds an optional parameter to the tool.- 参数:
name- the name of the parameter.jsonSchemaProperties- the properties of the parameter.- 返回:
this
-
addOptionalParameter
public ToolSpecification.Builder addOptionalParameter(String name, Iterable<JsonSchemaProperty> jsonSchemaProperties) Adds an optional parameter to the tool.- 参数:
name- the name of the parameter.jsonSchemaProperties- the properties of the parameter.- 返回:
this
-
build
Returns aToolSpecificationbuilt from the parameters previously set.- 返回:
- a
ToolSpecificationbuilt with parameters of thisToolSpecification.Builder
-