Skip to content

Commit 3861aeb

Browse files
huidongyinWillam2004
authored andcommitted
Fix incorrect example code in documentation (spring-projects#3993)
Fixes spring-projects#3993 Auto-cherry-pick to 1.0.x Signed-off-by: huidong.yin <[email protected]> Signed-off-by: 家娃 <[email protected]>
1 parent 62dca10 commit 3861aeb

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ When building tools from a method, the `ToolDefinition` is automatically generat
789789
[source,java]
790790
----
791791
Method method = ReflectionUtils.findMethod(DateTimeTools.class, "getCurrentDateTime");
792-
ToolDefinition toolDefinition = ToolDefinition.from(method);
792+
ToolDefinition toolDefinition = ToolDefinitions.from(method);
793793
----
794794

795795
The `ToolDefinition` generated from a method includes the method name as the tool name, the method name as the tool description, and the JSON schema of the method input parameters. If the method is annotated with `@Tool`, the tool name and description will be taken from the annotation, if set.

0 commit comments

Comments
 (0)