优化了agent
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { tool } from "langchain"
|
||||
import lunarLib from "lunar-javascript"
|
||||
import { tool } from "@langchain/core/tools";
|
||||
import { z } from "zod";
|
||||
import lunarLib from "lunar-javascript";
|
||||
const { Solar, HolidayUtil } = lunarLib
|
||||
|
||||
/**
|
||||
@@ -36,17 +37,8 @@ export const getYearHolidaysTool = tool(
|
||||
{
|
||||
name: "get_year_holidays",
|
||||
description: "查询给定年份节日所在日期列表,包括法定节假日安排(含调休)与传统节日",
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
year: {
|
||||
type: "number",
|
||||
description: "年份",
|
||||
minimum: 1900,
|
||||
maximum: 2100
|
||||
}
|
||||
},
|
||||
required: ["year"]
|
||||
}
|
||||
schema: z.object({
|
||||
year: z.number().int().min(1900).max(2100).describe("年份")
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user