Ferocious0xide commited on
Commit
401f9bf
·
verified ·
1 Parent(s): 23f40a4

Update app.py

Browse files

adding in DuckDuckGo search tool

Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -43,6 +43,14 @@ def get_current_time_in_timezone(timezone: str) -> str:
43
  except Exception as e:
44
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
45
 
 
 
 
 
 
 
 
 
46
  # Initialize components
47
  final_answer = FinalAnswerTool()
48
 
 
43
  except Exception as e:
44
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
45
 
46
+ def initialize_agent():
47
+ """Initialize and return the CodeAgent with all tools."""
48
+
49
+ # Initialize tools
50
+ final_answer = FinalAnswerTool()
51
+ web_search = DuckDuckGoSearchTool(max_results=5) # Initialize DDG search with 5 results
52
+
53
+
54
  # Initialize components
55
  final_answer = FinalAnswerTool()
56