diff --git a/spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/MethodToolCallbackTests.java b/spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/MethodToolCallbackTests.java index d0222c6e0..f15961e3b 100644 --- a/spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/MethodToolCallbackTests.java +++ b/spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/MethodToolCallbackTests.java @@ -16,10 +16,13 @@ package org.springframework.ai.integration.tests.tool; +import java.util.List; + import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import org.springframework.ai.chat.client.ChatClient; import org.springframework.ai.integration.tests.TestApplication; import org.springframework.ai.integration.tests.tool.domain.Author; @@ -32,10 +35,6 @@ import org.springframework.ai.tool.method.MethodToolCallback; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - import static org.assertj.core.api.Assertions.assertThat; /** @@ -96,7 +95,8 @@ public class MethodToolCallbackTests { var content = ChatClient.builder(this.openAiChatModel) .build() .prompt() - .user("What authors wrote the books %s and %s available in the library?".formatted("The Hobbit", "Narnia")) + .user("What authors wrote the books %s and %s available in the library?".formatted("The Hobbit", + "The Lion, the Witch and the Wardrobe")) .tools(tools) .call() .content(); @@ -108,7 +108,8 @@ public class MethodToolCallbackTests { var content = ChatClient.builder(this.openAiChatModel) .build() .prompt() - .user("What authors wrote the books %s and %s available in the library?".formatted("The Hobbit", "Narnia")) + .user("What authors wrote the books %s and %s available in the library?".formatted("The Hobbit", + "The Lion, the Witch and the Wardrobe")) .tools(ToolCallbacks.from(tools)) .call() .content(); diff --git a/spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/ToolCallingManagerTests.java b/spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/ToolCallingManagerTests.java index 06ea08685..f07591877 100644 --- a/spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/ToolCallingManagerTests.java +++ b/spring-ai-integration-tests/src/test/java/org/springframework/ai/integration/tests/tool/ToolCallingManagerTests.java @@ -139,7 +139,7 @@ public class ToolCallingManagerTests { assertThat(chatResponse).isNotNull(); assertThat(chatResponse.getResult().getOutput().getText()).isNotEmpty() .contains("His Dark Materials") - .contains("Narnia") + .contains("The Lion, the Witch and the Wardrob") .contains("The Hobbit") .contains("The Lord of The Rings") .contains("The Silmarillion");