тулза

This commit is contained in:
2025-12-30 14:49:34 +03:00
parent 867279d5ee
commit bf7aacb1a7

View File

@@ -0,0 +1,18 @@
package ru.ldeloff.currenttime.tool;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
@Slf4j
@Component
public class CurrentTimeTool {
@Tool(description = "Get the current date in the ISO-8601 format yyyy-MM-dd HH:MM:ss")
String getCurrentDate() {
log.info("Getting current datetime: {}", LocalDateTime.now());
return LocalDateTime.now().toString();
}
}