Spaces:
Sleeping
Sleeping
Add web_search tool
Browse files
app.py
CHANGED
@@ -33,6 +33,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
33 |
except Exception as e:
|
34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
35 |
|
|
|
36 |
|
37 |
final_answer = FinalAnswerTool()
|
38 |
|
@@ -56,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
56 |
|
57 |
agent = CodeAgent(
|
58 |
model=model,
|
59 |
-
tools=[final_answer, image_generation_tool], ## add your tools here (don't remove final answer)
|
60 |
max_steps=6,
|
61 |
verbosity_level=1,
|
62 |
grammar=None,
|
|
|
33 |
except Exception as e:
|
34 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
35 |
|
36 |
+
web_search = DuckDuckGoSearchTool()
|
37 |
|
38 |
final_answer = FinalAnswerTool()
|
39 |
|
|
|
57 |
|
58 |
agent = CodeAgent(
|
59 |
model=model,
|
60 |
+
tools=[final_answer, image_generation_tool, web_search], ## add your tools here (don't remove final answer)
|
61 |
max_steps=6,
|
62 |
verbosity_level=1,
|
63 |
grammar=None,
|