-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Bug description
A simple toolcalling for asking current datetime, but i receive toolCallArguments cannot be null or empty
Environment
1.0.0-RC1
spring-ai-starter-model-openai
Steps to reproduce
@Slf4j
public class DatetimeTools {
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
@Tool(description = "Query current date and time")
public String getCurrentDatetime() {
String currentDatetime = LocalDateTime.now().format(formatter);
return currentDatetime;
}
}
client.prompt()
.user("What time is it now? ")
.tools(new DatetimeTools())
.stream()
.content()
.subscribe(log::info);
Expected behavior
It's ok when i use sync calling, but fail on stream calling. Anything i missed?
Minimal Complete Reproducible example
Metadata
Metadata
Assignees
Labels
No labels