fix: correct ToolDefinition.builder() usage in docs (#3431)
Signed-off-by: SexyProgrammer <49146257+SexyProgrammer@users.noreply.github.com>
(cherry picked from commit 8af1d3958f)
This commit is contained in:
committed by
Spring Builds
parent
35e8ee9b06
commit
de3edbd867
@@ -316,7 +316,7 @@ The `ToolMetadata.Builder` allows you to build a `ToolMetadata` instance and def
|
||||
----
|
||||
Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime");
|
||||
ToolCallback toolCallback = MethodToolCallback.builder()
|
||||
.toolDefinition(ToolDefinition.builder(method)
|
||||
.toolDefinition(ToolDefinitions.builder(method)
|
||||
.description("Get the current date and time in the user's timezone")
|
||||
.build())
|
||||
.toolMethod(method)
|
||||
@@ -349,7 +349,7 @@ class DateTimeTools {
|
||||
----
|
||||
Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime");
|
||||
ToolCallback toolCallback = MethodToolCallback.builder()
|
||||
.toolDefinition(ToolDefinition.builder(method)
|
||||
.toolDefinition(ToolDefinitions.builder(method)
|
||||
.description("Get the current date and time in the user's timezone")
|
||||
.build())
|
||||
.toolMethod(method)
|
||||
@@ -801,7 +801,7 @@ If you'd rather provide some or all of the attributes explicitly, you can use th
|
||||
[source,java]
|
||||
----
|
||||
Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime");
|
||||
ToolDefinition toolDefinition = ToolDefinition.builder(method)
|
||||
ToolDefinition toolDefinition = ToolDefinitions.builder(method)
|
||||
.name("currentDateTime")
|
||||
.description("Get the current date and time in the user's timezone")
|
||||
.inputSchema(JsonSchemaGenerator.generateForMethodInput(method))
|
||||
|
||||
Reference in New Issue
Block a user