Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,12 +8,12 @@ from tools.final_answer import FinalAnswerTool
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
@tool
|
| 11 |
-
def
|
| 12 |
"""A tool that runs a DuckDuckGo search and returns a formatted result.
|
| 13 |
Args:
|
| 14 |
query: A string representing the query to search for.
|
| 15 |
"""
|
| 16 |
-
return
|
| 17 |
|
| 18 |
@tool
|
| 19 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
@@ -52,7 +52,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 52 |
|
| 53 |
agent = CodeAgent(
|
| 54 |
model=model,
|
| 55 |
-
tools=[final_answer, get_current_time_in_timezone,
|
| 56 |
max_steps=6,
|
| 57 |
verbosity_level=1,
|
| 58 |
grammar=None,
|
|
|
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
@tool
|
| 11 |
+
def search_web(query:str)-> str:
|
| 12 |
"""A tool that runs a DuckDuckGo search and returns a formatted result.
|
| 13 |
Args:
|
| 14 |
query: A string representing the query to search for.
|
| 15 |
"""
|
| 16 |
+
return DuckDuckGoSearchTool(query)
|
| 17 |
|
| 18 |
@tool
|
| 19 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 52 |
|
| 53 |
agent = CodeAgent(
|
| 54 |
model=model,
|
| 55 |
+
tools=[final_answer, get_current_time_in_timezone, search_web], ## add your tools here (don't remove final answer)
|
| 56 |
max_steps=6,
|
| 57 |
verbosity_level=1,
|
| 58 |
grammar=None,
|