Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,20 +8,16 @@ from tools.web_search import DuckDuckGoSearchTool as DuckTool
|
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
-
|
| 12 |
@tool
|
| 13 |
-
def
|
| 14 |
-
|
| 15 |
-
"""A tool that does nothing yet
|
| 16 |
Args:
|
| 17 |
-
|
| 18 |
-
arg2: the second argument
|
| 19 |
"""
|
| 20 |
-
return "
|
| 21 |
-
|
| 22 |
|
| 23 |
|
| 24 |
-
|
| 25 |
@tool
|
| 26 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 27 |
"""A tool that fetches the current local time in a specified timezone.
|
|
@@ -63,7 +59,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 63 |
|
| 64 |
agent = CodeAgent(
|
| 65 |
model=model,
|
| 66 |
-
tools=[research_tool,
|
| 67 |
max_steps=6,
|
| 68 |
verbosity_level=1,
|
| 69 |
grammar=None,
|
|
|
|
| 8 |
|
| 9 |
from Gradio_UI import GradioUI
|
| 10 |
|
| 11 |
+
|
| 12 |
@tool
|
| 13 |
+
def dev_jokes(jokes:[str])-> str: #it's import to specify the return type
|
| 14 |
+
"""A tool that takes a list of dev jokes ad just display them to the user
|
|
|
|
| 15 |
Args:
|
| 16 |
+
jokes: A list of jokes
|
|
|
|
| 17 |
"""
|
| 18 |
+
return "Hey, see what i've found, you will like it : "+ jokes
|
|
|
|
| 19 |
|
| 20 |
|
|
|
|
| 21 |
@tool
|
| 22 |
def get_current_time_in_timezone(timezone: str) -> str:
|
| 23 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
|
| 59 |
|
| 60 |
agent = CodeAgent(
|
| 61 |
model=model,
|
| 62 |
+
tools=[research_tool, dev_jokes, final_answer], ## add your tools here (don't remove final answer)
|
| 63 |
max_steps=6,
|
| 64 |
verbosity_level=1,
|
| 65 |
grammar=None,
|