完善了agent
This commit is contained in:
17
agent/tools/system/system_time.js
Normal file
17
agent/tools/system/system_time.js
Normal file
@@ -0,0 +1,17 @@
|
||||
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({})
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user