function call not OK
@GetMapping(value = "/tools", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<String> chat() {
System.out.println("tools...");
DateTimeTools toolx = new DateTimeTools();
Flux<String> content = chatClient
.prompt("What day is tomorrow?")
.tools(toolx)
.stream()
.content();
return content;
}
In Spring AI version 1.0.0-M6, the stream() method fails to trigger function calls,but it function call is OK
@GetMapping(value = "/tools")
public String chat() {
System.out.println("tools...");
DateTimeTools toolx = new DateTimeTools();
String content = chatClient
.prompt("What day is tomorrow?")
.tools(toolx)
.call()
.content();
return content;
}