You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Spring AI's tool calling mechanism allows Large Language Models (LLMs) to suggest and execute methods annotated with @tool. It is powerful, it lacks a built-in, declarative way to signify that a particular tool's execution by enabling a clear "human-in-the-loop" mechanism for tool execution.
@Tool(description = "Deletes the given book by id")
@RequiresConsent(message = "The book {bookId} is going to be deleted. Do you approve?")
public void deleteBookById(String bookId) {
// Actual logic to delete a book
}