Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this change, we can rename this test class to "FunctionCallbackKotlinIT" as well. Will do it when merging.

import org.springframework.ai.model.function.FunctionCallingOptions
import org.springframework.ai.ollama.OllamaChatModel
import org.springframework.ai.ollama.api.OllamaModel
Expand Down Expand Up @@ -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()
}

}
Expand Down