Skip to content

Commit 0abaf82

Browse files
ilayaperumalgscionaltera
authored andcommitted
Fix Anthropic FunctionCallWithPromptFunctionIT
- Fix the function toolcallback definition name Signed-off-by: Ilayaperumal Gopinathan <[email protected]>
1 parent aed37fc commit 0abaf82

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

auto-configurations/models/spring-ai-autoconfigure-model-anthropic/src/test/java/org/springframework/ai/model/anthropic/autoconfigure/tool/FunctionCallWithPromptFunctionIT.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ void functionCallTest() {
5858
"What's the weather like in San Francisco, in Paris and in Tokyo? Return the temperature in Celsius.");
5959

6060
var promptOptions = AnthropicChatOptions.builder()
61-
.toolCallbacks(
62-
List.of(FunctionToolCallback.builder("CurrentWeatherService", new MockWeatherService())
63-
.description("Get the weather in location. Return temperature in 36°F or 36°C format.")
64-
.inputType(MockWeatherService.Request.class)
65-
.build()))
61+
.toolCallbacks(List.of(FunctionToolCallback.builder("getCurrentWeather", new MockWeatherService())
62+
.description("Get the weather in location. Return temperature in 36°F or 36°C format.")
63+
.inputType(MockWeatherService.Request.class)
64+
.build()))
6665
.build();
6766

6867
ChatResponse response = chatModel.call(new Prompt(List.of(userMessage), promptOptions));

0 commit comments

Comments
 (0)