fix: tool call failed problem

This commit is contained in:
zhayujie
2026-02-01 12:31:58 +08:00
parent 07959a3bff
commit 9bf5b0fc48
7 changed files with 331 additions and 85 deletions

View File

@@ -21,6 +21,7 @@ from agent.tools.memory.memory_get import MemoryGetTool
# Import web tools
from agent.tools.web_fetch.web_fetch import WebFetch
from agent.tools.bocha_search.bocha_search import BochaSearch
# Import tools with optional dependencies
def _import_optional_tools():
@@ -93,6 +94,7 @@ __all__ = [
'MemorySearchTool',
'MemoryGetTool',
'WebFetch',
'BochaSearch',
# Optional tools (may be None if dependencies not available)
'GoogleSearch',
'FileSave',

View File

@@ -46,7 +46,7 @@ class WebFetch(BaseTool):
def __init__(self, config: dict = None):
self.config = config or {}
self.timeout = self.config.get("timeout", 30)
self.timeout = self.config.get("timeout", 20)
self.max_redirects = self.config.get("max_redirects", 3)
self.user_agent = self.config.get(
"user_agent",