- add FunctionCallbackMethodProcessor to support parsing.
- add the FunctionCalling annotation to declare
- add FunctionCallbackMethodProcessorIT as test
Dependent on https://github.com/spring-projects/spring-ai/pull/1099
define:
public class FunctionCallConfig {
@FunctionCalling(name = "dateTime", description = "get the current date and time")
public String dateTime(String location) {
return location + " dateTime:" + LocalDateTime.now();
}
}
use:
client.prompt().user("What is the time in New York?").functions("dateTime").call().content();