fix: 移动 DailyNewsTool 的描述位置

This commit is contained in:
ycxom 2025-01-02 21:23:55 +08:00
parent aa5dfa0d3b
commit 079304eb51

View file

@ -3,6 +3,7 @@ import fetch from 'node-fetch'
export class DailyNewsTool extends AbstractTool { export class DailyNewsTool extends AbstractTool {
name = 'dailyNews' name = 'dailyNews'
parameters = { parameters = {
properties: { properties: {
action: { action: {
@ -14,9 +15,7 @@ export class DailyNewsTool extends AbstractTool {
required: ['action'] required: ['action']
} }
description = 'Useful when you want to know today\'s news headlines and hot topics. Use keywords like "今日新闻", "每日新闻", "60秒新闻" to get news.' func = async function (opts) {
func = async function(opts) {
try { try {
// 添加请求头和超时设置 // 添加请求头和超时设置
const controller = new AbortController() const controller = new AbortController()
@ -91,4 +90,5 @@ export class DailyNewsTool extends AbstractTool {
} }
return result return result
} }
description = 'Useful when you want to know today\'s news headlines and hot topics. Use keywords like "今日新闻", "每日新闻", "60秒新闻" to get news.'
} }