Skip to content

Commit e478804

Browse files
authored
docs: fix incorrect usage of tools and defaultTools (#3533)
Auto-cherry-pick to 1.0.x Signed-off-by: Jemin Huh <hjm1980@gmail.com>
1 parent b9a6834 commit e478804

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/bedrock-converse.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public Function<Request, Response> weatherFunction() {
168168
169169
String response = ChatClient.create(this.chatModel)
170170
.prompt("What's the weather like in Boston?")
171-
.tools("weatherFunction")
171+
.toolNames("weatherFunction")
172172
.inputType(Request.class)
173173
.call()
174174
.content();

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/vertexai-gemini-chat.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public Function<Request, Response> weatherFunction() {
165165
166166
String response = ChatClient.create(this.chatModel)
167167
.prompt("What's the weather like in Boston?")
168-
.tools("weatherFunction")
168+
.toolNames("weatherFunction")
169169
.inputType(Request.class)
170170
.call()
171171
.content();

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
@@ -641,7 +641,7 @@ WARNING: Default tools are shared across all the chat requests performed by all
641641
----
642642
ChatModel chatModel = ...
643643
ChatClient chatClient = ChatClient.builder(chatModel)
644-
.defaultTools("currentWeather")
644+
.defaultToolNames("currentWeather")
645645
.build();
646646
----
647647

0 commit comments

Comments
 (0)