huytofu92 commited on
Commit
ff1ad14
·
1 Parent(s): eda541b

Last fix I promise!

Browse files
Files changed (1) hide show
  1. mini_agents.py +7 -2
mini_agents.py CHANGED
@@ -172,8 +172,13 @@ class MasterAgentWrapper:
172
  def _run_with_browser_tools(self, question: str, browser_tools: List[Tool]) -> str:
173
  """Run agent with browser tools"""
174
  # Temporarily add browser tools
175
- original_tools = self.master_agent.tools
176
- self.master_agent.tools = original_tools + browser_tools
 
 
 
 
 
177
 
178
  try:
179
  # Run the agent directly since we're in a sync context
 
172
  def _run_with_browser_tools(self, question: str, browser_tools: List[Tool]) -> str:
173
  """Run agent with browser tools"""
174
  # Temporarily add browser tools
175
+ original_tools = self.master_agent.tools.copy() # Copy the dictionary
176
+ all_tools = original_tools.copy()
177
+ # Add browser tools to the dictionary
178
+ for tool in browser_tools:
179
+ all_tools[tool.name] = tool
180
+
181
+ self.master_agent.tools = all_tools
182
 
183
  try:
184
  # Run the agent directly since we're in a sync context