пу пу пууу
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
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">
|
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>
|
<groupId>ru.ldeloff</groupId>
|
||||||
<artifactId>AiTools</artifactId>
|
<artifactId>AiTools</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>current-time</artifactId>
|
<artifactId>current-time</artifactId>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package ru.ldeloff.currenttime;
|
package ru.ldeloff.currenttime;
|
||||||
|
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
public class CurrentTime {
|
public class CurrentTime {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("Current time: " + java.time.LocalDateTime.now());
|
System.out.println("Current time: " + java.time.LocalDateTime.now());
|
||||||
|
|||||||
@@ -2,15 +2,17 @@ package ru.ldeloff.currenttime.tool;
|
|||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.ai.tool.annotation.Tool;
|
import org.springframework.ai.tool.annotation.Tool;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@Component
|
||||||
public class CurrentTimeTool {
|
public class CurrentTimeTool {
|
||||||
|
|
||||||
@Tool(description = "Get the current date in the ISO-8601 format yyyy-MM-dd")
|
@Tool(description = "Get the current date in the ISO-8601 format yyyy-MM-dd")
|
||||||
String getCurrentDate() {
|
String getCurrentDate() {
|
||||||
log.info("Getting current date");
|
// log.info("Getting current date");
|
||||||
return LocalDate.now().toString();
|
return LocalDate.now().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user