diff --git a/spring-ai-spring-boot-autoconfigure/src/test/kotlin/org/springframework/ai/autoconfigure/ollama/tool/FunctionCallbackWrapperKotlinIT.kt b/spring-ai-spring-boot-autoconfigure/src/test/kotlin/org/springframework/ai/autoconfigure/ollama/tool/FunctionCallbackKotlinIT.kt similarity index 89% rename from spring-ai-spring-boot-autoconfigure/src/test/kotlin/org/springframework/ai/autoconfigure/ollama/tool/FunctionCallbackWrapperKotlinIT.kt rename to spring-ai-spring-boot-autoconfigure/src/test/kotlin/org/springframework/ai/autoconfigure/ollama/tool/FunctionCallbackKotlinIT.kt index dd191a901..0b3399027 100644 --- a/spring-ai-spring-boot-autoconfigure/src/test/kotlin/org/springframework/ai/autoconfigure/ollama/tool/FunctionCallbackWrapperKotlinIT.kt +++ b/spring-ai-spring-boot-autoconfigure/src/test/kotlin/org/springframework/ai/autoconfigure/ollama/tool/FunctionCallbackKotlinIT.kt @@ -26,7 +26,6 @@ import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration import org.springframework.ai.chat.messages.UserMessage import org.springframework.ai.chat.prompt.Prompt import org.springframework.ai.model.function.FunctionCallback -import org.springframework.ai.model.function.FunctionCallbackWrapper import org.springframework.ai.model.function.FunctionCallingOptions import org.springframework.ai.ollama.OllamaChatModel import org.springframework.ai.ollama.api.OllamaModel @@ -36,7 +35,7 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration -class FunctionCallbackWrapperKotlinIT : BaseOllamaIT() { +class FunctionCallbackKotlinIT : BaseOllamaIT() { companion object { @@ -49,7 +48,7 @@ class FunctionCallbackWrapperKotlinIT : BaseOllamaIT() { } } - private val logger = LoggerFactory.getLogger(FunctionCallbackWrapperKotlinIT::class.java) + private val logger = LoggerFactory.getLogger(FunctionCallbackKotlinIT::class.java) private val contextRunner = ApplicationContextRunner() .withPropertyValues( @@ -106,13 +105,13 @@ class FunctionCallbackWrapperKotlinIT : BaseOllamaIT() { @Bean open fun weatherFunctionInfo(): FunctionCallback { - - return FunctionCallbackWrapper.builder(MockKotlinWeatherService()) - .withName("WeatherInfo") - .withInputType(KotlinRequest::class.java) - .withDescription( - "Find the weather conditions, forecasts, and temperatures for a location, like a city or state.") - .build(); + return FunctionCallback.builder() + .description( + "Find the weather conditions, forecasts, and temperatures for a location, like a city or state." + ) + .function("WeatherInfo", MockKotlinWeatherService()) + .inputType(KotlinRequest::class.java) + .build() } }