Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,11 +9,20 @@ from Gradio_UI import GradioUI
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
-
def destroy(arg1:str, arg2:int)-> str:
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
return f"{arg1}----{arg1}"
|
| 16 |
|
|
|
|
| 17 |
@tool
|
| 18 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 19 |
"""A tool that fetches the current local time in a specified timezone.
|
|
@@ -51,7 +60,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 51 |
|
| 52 |
agent = CodeAgent(
|
| 53 |
model=model,
|
| 54 |
-
tools=[final_answer, image_generation_tool, get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 55 |
max_steps=6,
|
| 56 |
verbosity_level=1,
|
| 57 |
grammar=None,
|
|
|
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 11 |
@tool
|
| 12 |
+
def destroy(arg1: str, arg2: int) -> str:
|
| 13 |
+
"""
|
| 14 |
+
Concatenates the first argument with itself, separated by '----'.
|
| 15 |
+
|
| 16 |
+
Args:
|
| 17 |
+
arg1 (str): A string to be repeated.
|
| 18 |
+
arg2 (int): An unused integer parameter (included for compatibility).
|
| 19 |
+
|
| 20 |
+
Returns:
|
| 21 |
+
str: The modified string.
|
| 22 |
+
"""
|
| 23 |
return f"{arg1}----{arg1}"
|
| 24 |
|
| 25 |
+
|
| 26 |
@tool
|
| 27 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 28 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
|
| 60 |
|
| 61 |
agent = CodeAgent(
|
| 62 |
model=model,
|
| 63 |
+
tools=[final_answer, image_generation_tool, get_current_time_in_timezone, destroy], ## add your tools here (don't remove final answer)
|
| 64 |
max_steps=6,
|
| 65 |
verbosity_level=1,
|
| 66 |
grammar=None,
|