Spaces:
Runtime error
Runtime error
modified the tool
Browse files
app.py
CHANGED
@@ -12,12 +12,12 @@ from Gradio_UI import GradioUI
|
|
12 |
@tool
|
13 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
14 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
15 |
-
"""A tool that
|
16 |
Args:
|
17 |
arg1: the first argument
|
18 |
arg2: the second argument
|
19 |
"""
|
20 |
-
return
|
21 |
|
22 |
@tool
|
23 |
def get_current_time_in_timezone(timezone: str) -> str:
|
@@ -57,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
57 |
|
58 |
agent = CodeAgent(
|
59 |
model=model,
|
60 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
61 |
max_steps=6,
|
62 |
verbosity_level=1,
|
63 |
grammar=None,
|
|
|
12 |
@tool
|
13 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
14 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
15 |
+
"""A tool that is used as a string multiplier
|
16 |
Args:
|
17 |
arg1: the first argument
|
18 |
arg2: the second argument
|
19 |
"""
|
20 |
+
return arg1*arg2
|
21 |
|
22 |
@tool
|
23 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
57 |
|
58 |
agent = CodeAgent(
|
59 |
model=model,
|
60 |
+
tools=[final_answer, my_custom_tool], ## add your tools here (don't remove final answer)
|
61 |
max_steps=6,
|
62 |
verbosity_level=1,
|
63 |
grammar=None,
|