fix: fetch_top改为必传,最低3条,SearXNG和内置引擎统一自动抓取
This commit is contained in:
@@ -582,7 +582,7 @@
|
|||||||
582| const maxResults = Math.min(params.max_results || 30, 30);
|
582| const maxResults = Math.min(params.max_results || 30, 30);
|
||||||
583| const timeRange = params.time_range || '';
|
583| const timeRange = params.time_range || '';
|
||||||
584| const enhanceSnippets = params.enhance_snippets !== false;
|
584| const enhanceSnippets = params.enhance_snippets !== false;
|
||||||
585| const fetchTop = Math.min(params.fetch_top || 0, 10);
|
585| const fetchTop = Math.max(3, Math.min(params.fetch_top || 3, 10));
|
||||||
586|
|
586|
|
||||||
587| let result: ToolResult;
|
587| let result: ToolResult;
|
||||||
588|
|
588|
|
||||||
|
|||||||
@@ -345,10 +345,10 @@ export const TOOL_DEFINITIONS: ToolDefinition[] = [
|
|||||||
max_results: { type: 'integer', description: 'Maximum number of results to return. Default: 30, max: 30.' },
|
max_results: { type: 'integer', description: 'Maximum number of results to return. Default: 30, max: 30.' },
|
||||||
time_range: { type: 'string', enum: ['day', 'week', 'month', 'year'], description: 'Filter results by time. Supported by Bing and Google. Use for recent news, latest version, etc.' },
|
time_range: { type: 'string', enum: ['day', 'week', 'month', 'year'], description: 'Filter results by time. Supported by Bing and Google. Use for recent news, latest version, etc.' },
|
||||||
enhance_snippets: { type: 'boolean', description: 'Auto-fetch detailed snippet for results with too-short descriptions. Default: true.' },
|
enhance_snippets: { type: 'boolean', description: 'Auto-fetch detailed snippet for results with too-short descriptions. Default: true.' },
|
||||||
fetch_top: { type: 'integer', description: 'Automatically fetch full content from the top N search results. Default: 0 (no auto-fetch). Recommended: 3-5.' }
|
fetch_top: { type: 'integer', description: 'Number of top results to auto-fetch full content for. Min: 3, max: 10. Results shorter than this are useless — snippets lack detail.' }
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
required: ['query', 'fetch_top']
|
||||||
},
|
},
|
||||||
// ══════════════════════════════════════════════
|
// ══════════════════════════════════════════════
|
||||||
// v4.0 新增工具:记忆和会话管理
|
// v4.0 新增工具:记忆和会话管理
|
||||||
|
|||||||
Reference in New Issue
Block a user