Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,8 @@ from tools.web_search import DuckDuckGoSearchTool
|
|
10 |
|
11 |
from Gradio_UI import GradioUI
|
12 |
|
13 |
-
|
|
|
14 |
@tool
|
15 |
def my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
16 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
@@ -20,10 +21,11 @@ def my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
20 |
arg2: the second argument
|
21 |
"""
|
22 |
return "What magic will you build ?"
|
|
|
23 |
|
24 |
@tool
|
25 |
def get_current_time_in_timezone(timezone: str) -> str:
|
26 |
-
"""A tool that fetches the current local time in a specified timezone.
|
27 |
Args:
|
28 |
timezone: A string representing a valid timezone (e.g., 'America/New_York').
|
29 |
"""
|
@@ -72,7 +74,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
72 |
|
73 |
agent = CodeAgent(
|
74 |
model=model,
|
75 |
-
tools=[visit_webpage, web_search, final_answer], ## add your tools here (don't remove final answer)
|
76 |
max_steps=6,
|
77 |
verbosity_level=1,
|
78 |
grammar=None,
|
|
|
10 |
|
11 |
from Gradio_UI import GradioUI
|
12 |
|
13 |
+
'''
|
14 |
+
# Below is an example of a tool that does nothing.
|
15 |
@tool
|
16 |
def my_cutom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
17 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
|
|
21 |
arg2: the second argument
|
22 |
"""
|
23 |
return "What magic will you build ?"
|
24 |
+
'''
|
25 |
|
26 |
@tool
|
27 |
def get_current_time_in_timezone(timezone: str) -> str:
|
28 |
+
"""A tool that fetches the current date and local time in a specified timezone.
|
29 |
Args:
|
30 |
timezone: A string representing a valid timezone (e.g., 'America/New_York').
|
31 |
"""
|
|
|
74 |
|
75 |
agent = CodeAgent(
|
76 |
model=model,
|
77 |
+
tools=[get_current_time_in_timezone, visit_webpage, web_search, final_answer], ## add your tools here (don't remove final answer)
|
78 |
max_steps=6,
|
79 |
verbosity_level=1,
|
80 |
grammar=None,
|