@@ -26,7 +26,6 @@ import org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration
26
26
import org.springframework.ai.chat.messages.UserMessage
27
27
import org.springframework.ai.chat.prompt.Prompt
28
28
import org.springframework.ai.model.function.FunctionCallback
29
- import org.springframework.ai.model.function.FunctionCallbackWrapper
30
29
import org.springframework.ai.model.function.FunctionCallingOptions
31
30
import org.springframework.ai.ollama.OllamaChatModel
32
31
import org.springframework.ai.ollama.api.OllamaModel
@@ -36,7 +35,7 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner
36
35
import org.springframework.context.annotation.Bean
37
36
import org.springframework.context.annotation.Configuration
38
37
39
- class FunctionCallbackWrapperKotlinIT : BaseOllamaIT () {
38
+ class FunctionCallbackKotlinIT : BaseOllamaIT () {
40
39
41
40
companion object {
42
41
@@ -49,7 +48,7 @@ class FunctionCallbackWrapperKotlinIT : BaseOllamaIT() {
49
48
}
50
49
}
51
50
52
- private val logger = LoggerFactory .getLogger(FunctionCallbackWrapperKotlinIT ::class .java)
51
+ private val logger = LoggerFactory .getLogger(FunctionCallbackKotlinIT ::class .java)
53
52
54
53
private val contextRunner = ApplicationContextRunner ()
55
54
.withPropertyValues(
@@ -106,13 +105,13 @@ class FunctionCallbackWrapperKotlinIT : BaseOllamaIT() {
106
105
107
106
@Bean
108
107
open fun weatherFunctionInfo (): FunctionCallback {
109
-
110
- return FunctionCallbackWrapper .builder( MockKotlinWeatherService ())
111
- .withName( " WeatherInfo " )
112
- .withInputType( KotlinRequest :: class .java )
113
- .withDescription(
114
- " Find the weather conditions, forecasts, and temperatures for a location, like a city or state. " )
115
- .build();
108
+ return FunctionCallback .builder()
109
+ .description(
110
+ " Find the weather conditions, forecasts, and temperatures for a location, like a city or state. "
111
+ )
112
+ .function( " WeatherInfo " , MockKotlinWeatherService ())
113
+ .inputType( KotlinRequest :: class .java )
114
+ .build()
116
115
}
117
116
118
117
}
0 commit comments