тулза
This commit is contained in:
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user