Skip to content

Commit eda439c

Browse files
committed
Merge branch 'main' into refactor/cleanup-duplicates-in-agent
2 parents dd6cf4d + 07b7eea commit eda439c

12 files changed

+67
-26
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pyautogui="^0.9.54"
3737
json5="^0.12.0"
3838
tenacity="^9.1.2"
3939
crawl4ai="^0.6.3"
40-
camelot="^12.06.29"
40+
camelot-py="^1.0.0"
4141
xlrd="^0.7.1"
4242
toml = "^0.10.2"
4343
googlesearch-python = "^1.3.0"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pyautogui>=0.9.54
2626
json5>=0.12.0
2727
tenacity>=9.1.2
2828
crawl4ai>=0.6.3
29-
camelot>=12.06.29
29+
camelot-py>=1.0.0
3030
toml>=0.10.2
3131
xlrd>=0.7.1
3232
googlesearch-python>=1.3.0

src/agent/agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@ def create_agent():
5151
raise ValueError(f"Tool ID '{tool_id}' is not registered.")
5252
tools.append(REGISTED_TOOLS[tool_id]())
5353

54-
#tools = tools + sub_agent_tools
54+
tools = tools + sub_agent_tools
5555

5656
agent = REGISTED_AGENTS["planning_agent"](
5757
config=planning_agent_config,
5858
model=model_manager.registed_models[planning_agent_config.model_id],
5959
tools=tools,
6060
max_steps=planning_agent_config.max_steps,
61-
managed_agents=sub_agents,
6261
description=planning_agent_config.description,
6362
name=planning_agent_config.name,
6463
provide_run_summary=True,

src/config/cfg.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ class SearcherToolConfig(BaseModel):
2121
max_length: int = Field(default=50000, description="Maximum character length for the content to be fetched")
2222

2323
class DeepResearcherToolConfig(BaseModel):
24-
model_id: str = Field(default="claude-4-sonnet", description="Model ID for the LLM to use")
24+
model_id: str = Field(default="gpt-4.1", description="Model ID for the LLM to use")
2525
max_depth: int = Field(default=2, description="Maximum depth for the search")
2626
max_insights: int = Field(default=20, description="Maximum number of insights to extract")
2727
time_limit_seconds: int = Field(default=60, description="Time limit for the search in seconds")
2828
max_follow_ups: int = Field(default=3, description="Maximum number of follow-up questions to ask")
2929

3030
class BrowserToolConfig(BaseModel):
31-
model_id: str = Field(default="langchain-gpt-4.1", description="Model ID for the LLM to use")
31+
model_id: str = Field(default="gpt-4.1", description="Model ID for the LLM to use")
3232
headless: bool = Field(False, description="Whether to run browser in headless mode")
3333
disable_security: bool = Field(True, description="Disable browser security features")
3434
extra_chromium_args: List[str] = Field(default_factory=list, description="Extra arguments to pass to the browser")
@@ -48,7 +48,7 @@ class DeepAnalyzerToolConfig(BaseModel):
4848
summarizer_model_id: str = Field(default="gemini-2.5-pro", description="Model ID for the LLM to use")
4949

5050
class AgentConfig(BaseModel):
51-
model_id: str = Field(default="claude-4-sonnet",
51+
model_id: str = Field(default="gpt-4.1",
5252
description="Model ID for the LLM to use")
5353
name: str = Field(default="agent",
5454
description="Name of the agent")
@@ -64,10 +64,10 @@ class AgentConfig(BaseModel):
6464
description="List of agents the agent can manage")
6565

6666
class HierarchicalAgentConfig(BaseModel):
67-
name: str = Field(default="agentscope", description="Name of the hierarchical agent")
67+
name: str = Field(default="dra", description="Name of the hierarchical agent")
6868
use_hierarchical_agent: bool = Field(default=True, description="Whether to use hierarchical agent")
6969
planning_agent_config: AgentConfig = Field(default_factory=lambda: AgentConfig(
70-
model_id="claude-4-sonnet",
70+
model_id="gpt-4.1",
7171
name="planning_agent",
7272
description="A planning agent that can plan the steps to complete the task.",
7373
max_steps=20,
@@ -76,7 +76,7 @@ class HierarchicalAgentConfig(BaseModel):
7676
managed_agents=["deep_analyzer_agent", "browser_use_agent", "deep_researcher_agent"],
7777
))
7878
deep_analyzer_agent_config: AgentConfig = Field(default_factory=lambda: AgentConfig(
79-
model_id="claude-4-sonnet",
79+
model_id="gpt-4.1",
8080
name="deep_analyzer_agent",
8181
description="A team member that that performs systematic, step-by-step analysis of a given task, optionally leveraging information from external resources such as attached file or uri to provide comprehensive reasoning and answers. For any tasks that require in-depth analysis, particularly those involving attached file or uri, game, chess, computational tasks, or any other complex tasks. Please ask him for the reasoning and the final answer.",
8282
max_steps=3,
@@ -92,7 +92,7 @@ class HierarchicalAgentConfig(BaseModel):
9292
tools=["auto_browser_use", "python_interpreter"],
9393
))
9494
deep_researcher_agent_config: AgentConfig = Field(default_factory=lambda: AgentConfig(
95-
model_id="claude-4-sonnet",
95+
model_id="gpt-4.1",
9696
name="deep_researcher_agent",
9797
description="A team member capable of conducting extensive web searches to complete tasks, primarily focused on retrieving broad and preliminary information for quickly understanding a topic or obtaining rough answers. For tasks that require precise, structured, or interactive page-level information retrieval, please use the `browser_use_agent`.",
9898
max_steps=3,

src/tools/auto_browser.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class AutoBrowserUseTool(AsyncTool):
3333
output_type = "any"
3434

3535
def __init__(self):
36-
super(AutoBrowserUseTool, self).__init__()
3736

3837
self.browser_tool_config = config.browser_tool
3938

@@ -43,6 +42,8 @@ def __init__(self):
4342

4443
self._init_pdf_server()
4544

45+
super(AutoBrowserUseTool, self).__init__()
46+
4647
def _init_pdf_server(self):
4748

4849
server_proc = subprocess.Popen(
@@ -70,8 +71,8 @@ async def _browser_task(self, task):
7071

7172
assert model_id in ['gpt-4.1'], f"Model should be in [gpt-4.1, ], but got {model_id}. Please check your config file."
7273

73-
if "lanchain" not in model_id:
74-
model_id = f"lanchain-{model_id}"
74+
if "langchain" not in model_id:
75+
model_id = f"langchain-{model_id}"
7576

7677
model = model_manager.registed_models[model_id]
7778

src/tools/deep_analyzer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,10 @@ class DeepAnalyzerTool(AsyncTool):
5555
"additionalProperties": False,
5656
}
5757
output_type = "any"
58-
59-
analyzer_config = config.deep_analyzer_tool
6058

6159
def __init__(self):
62-
super().__init__()
60+
61+
self.analyzer_config = config.deep_analyzer_tool
6362

6463
self.analyzer_models = {
6564
model_id: model_manager.registed_models[model_id]
@@ -73,6 +72,8 @@ def __init__(self):
7372
timeout=30,
7473
)
7574

75+
super(DeepAnalyzerTool, self).__init__()
76+
7677
async def _analyze(self,
7778
model,
7879
task: Optional[str] = None,

src/tools/deep_researcher.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def __init__(self):
272272
self.model = model_manager.registed_models[self.deep_researcher_tool_config.model_id]
273273
self.web_searcher = WebSearcherTool()
274274
self.web_searcher.fetch_content = True # Enable content fetching
275-
super().__init__()
275+
super(DeepResearcherTool, self).__init__()
276276

277277
async def forward(
278278
self,
@@ -566,7 +566,8 @@ async def _analyze_content(
566566
return insights
567567

568568
async def _summary(self, query: str, reference_materials: str) -> str:
569-
model = model_manager.registed_models["Qwen"]
569+
570+
model = model_manager.registed_models['gpt-4o-search-preview']
570571

571572
messages = [
572573
{"role": "user", "content": query}

src/tools/search/google_search.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ def search(params):
146146
"""
147147

148148
base_url = os.getenv("SKYWORK_GOOGLE_SEARCH_API", None)
149+
150+
query = params.get("q", "")
151+
filter_year = params.get("filter_year", None)
149152

150153
# Use local google search api
151154
if base_url is not None:

tests/test_local_python_executor.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33

44
# It's good practice to define a small, fixed list for default authorized_imports in tests
55
# unless a test specifically needs to modify it.
6-
TEST_DEFAULT_AUTHORIZED_IMPORTS = ["math"] # Example, can be empty if preferred for stricter tests
6+
TEST_DEFAULT_AUTHORIZED_IMPORTS = [
7+
"math",
8+
"subprocess",
9+
"os",
10+
"os.path",
11+
] # Example, can be empty if preferred for stricter tests
712

813
class TestPythonInterpreterSandbox(unittest.TestCase):
914

tests/test_mdconverter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
model_manager.init_models(use_local_proxy=True)
1717

1818
mdconvert = MarkitdownConverter()
19-
md = mdconvert.convert(os.path.join(root, "data/GAIA/2023/validation/1f975693-876d-457b-a649-393859e79bf3.mp3"))
19+
md = mdconvert.convert(os.path.join(root, "data/GAIA/2023/validation/366e2f2b-8632-4ef2-81eb-bc3877489217.pdf"))
2020
print(md)

0 commit comments

Comments
 (0)