пу пу пууу

This commit is contained in:
2025-12-29 21:37:34 +03:00
parent c8a24630d9
commit 29b718bcda
3 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -8,6 +7,7 @@
<groupId>ru.ldeloff</groupId>
<artifactId>AiTools</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>current-time</artifactId>

View File

@@ -1,5 +1,8 @@
package ru.ldeloff.currenttime;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class CurrentTime {
public static void main(String[] args) {
System.out.println("Current time: " + java.time.LocalDateTime.now());

View File

@@ -2,15 +2,17 @@ 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.LocalDate;
@Slf4j
@Component
public class CurrentTimeTool {
@Tool(description = "Get the current date in the ISO-8601 format yyyy-MM-dd")
String getCurrentDate() {
log.info("Getting current date");
// log.info("Getting current date");
return LocalDate.now().toString();
}
}