Skip to content

Commit 8af1d39

Browse files
fix: correct ToolDefinition.builder() usage in docs (#3431)
Auto-cherry-pick to 1.0.x Signed-off-by: SexyProgrammer <49146257+SexyProgrammer@users.noreply.github.com>
1 parent b070c67 commit 8af1d39

File tree

1 file changed

+3
-3
lines changed
  • spring-ai-docs/src/main/antora/modules/ROOT/pages/api

1 file changed

+3
-3
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/tools.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ The `ToolMetadata.Builder` allows you to build a `ToolMetadata` instance and def
316316
----
317317
Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime");
318318
ToolCallback toolCallback = MethodToolCallback.builder()
319-
.toolDefinition(ToolDefinition.builder(method)
319+
.toolDefinition(ToolDefinitions.builder(method)
320320
.description("Get the current date and time in the user's timezone")
321321
.build())
322322
.toolMethod(method)
@@ -349,7 +349,7 @@ class DateTimeTools {
349349
----
350350
Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime");
351351
ToolCallback toolCallback = MethodToolCallback.builder()
352-
.toolDefinition(ToolDefinition.builder(method)
352+
.toolDefinition(ToolDefinitions.builder(method)
353353
.description("Get the current date and time in the user's timezone")
354354
.build())
355355
.toolMethod(method)
@@ -801,7 +801,7 @@ If you'd rather provide some or all of the attributes explicitly, you can use th
801801
[source,java]
802802
----
803803
Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime");
804-
ToolDefinition toolDefinition = ToolDefinition.builder(method)
804+
ToolDefinition toolDefinition = ToolDefinitions.builder(method)
805805
.name("currentDateTime")
806806
.description("Get the current date and time in the user's timezone")
807807
.inputSchema(JsonSchemaGenerator.generateForMethodInput(method))

0 commit comments

Comments
 (0)