package com.lanyuanxiaoyao.service.ai.chat.tools;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import org.springframework.ai.tool.annotation.Tool;

/**
 * @author lanyuanxiaoyao
 * @version 20250516
 */
public class DatetimeTools {
  private final static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

  @Tool(description = "获取当前日期和时间")
  public String getCurrentDateTime() {
    return LocalDateTime.now().format(formatter);
  }
}
