Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,14 +8,16 @@ from tools.final_answer import FinalAnswerTool
|
|
8 |
from Gradio_UI import GradioUI
|
9 |
|
10 |
@tool
|
11 |
-
def
|
12 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
13 |
-
"""
|
14 |
Args:
|
15 |
-
|
16 |
-
|
|
|
|
|
17 |
"""
|
18 |
-
return
|
19 |
|
20 |
@tool
|
21 |
def get_current_time_in_timezone(timezone: str) -> str:
|
@@ -50,7 +52,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
50 |
|
51 |
agent = CodeAgent(
|
52 |
model=model,
|
53 |
-
tools=[image_generation_tool,get_current_time_in_timezone,final_answer,DuckDuckGoSearchTool()], ## add or remove tools here
|
54 |
max_steps=6,
|
55 |
verbosity_level=1,
|
56 |
grammar=None,
|
|
|
8 |
from Gradio_UI import GradioUI
|
9 |
|
10 |
@tool
|
11 |
+
def add_numbers(a:int, b:int)-> int: #it's import to specify the return type
|
12 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
13 |
+
"""Add two integers togther
|
14 |
Args:
|
15 |
+
a: the first integer
|
16 |
+
b: the second integer
|
17 |
+
Returns:
|
18 |
+
The sum of a and b
|
19 |
"""
|
20 |
+
return a + b
|
21 |
|
22 |
@tool
|
23 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
52 |
|
53 |
agent = CodeAgent(
|
54 |
model=model,
|
55 |
+
tools=[image_generation_tool,get_current_time_in_timezone,final_answer,DuckDuckGoSearchTool(),add_numbers], ## add or remove tools here
|
56 |
max_steps=6,
|
57 |
verbosity_level=1,
|
58 |
grammar=None,
|