пу пу пууу
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"
|
||||
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>
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user