Files
api_health/agent/tools/system/system_time.js
2026-05-30 16:41:26 +08:00

18 lines
350 B
JavaScript

import * as z from "zod"
import { tool } from "langchain"
/**
* 获取系统时间工具
* @returns {string} - 返回当前系统时间
*/
export const getSystemTimeTool = tool(
(input) => {
return new Date().toLocaleString()
},
{
name: "get_system_time",
description: `获取当前系统时间`,
schema: z.object({})
}
)