Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,12 +16,12 @@ HF_TOKEN = os.environ.get("HF_TOKEN")
|
|
| 16 |
@tool
|
| 17 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
| 18 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 19 |
-
"""A tool that
|
| 20 |
Args:
|
| 21 |
arg1: the first argument
|
| 22 |
arg2: the second argument
|
| 23 |
"""
|
| 24 |
-
return
|
| 25 |
|
| 26 |
@tool
|
| 27 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
@@ -60,7 +60,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 60 |
|
| 61 |
agent = CodeAgent(
|
| 62 |
model=model,
|
| 63 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 64 |
max_steps=6,
|
| 65 |
verbosity_level=1,
|
| 66 |
grammar=None,
|
|
|
|
| 16 |
@tool
|
| 17 |
def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type
|
| 18 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 19 |
+
"""A tool that concatenates two str
|
| 20 |
Args:
|
| 21 |
arg1: the first argument
|
| 22 |
arg2: the second argument
|
| 23 |
"""
|
| 24 |
+
return arg1 + arg2
|
| 25 |
|
| 26 |
@tool
|
| 27 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
|
| 60 |
|
| 61 |
agent = CodeAgent(
|
| 62 |
model=model,
|
| 63 |
+
tools=[final_answer, my_custom_tool, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 64 |
max_steps=6,
|
| 65 |
verbosity_level=1,
|
| 66 |
grammar=None,
|