Spaces:
Sleeping
Sleeping
added_new_agents
Browse files
app.py
CHANGED
@@ -18,6 +18,15 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
18 |
"""
|
19 |
return "What magic will you build ?"
|
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.
|
@@ -35,7 +44,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
35 |
|
36 |
|
37 |
final_answer = FinalAnswerTool()
|
38 |
-
|
39 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
40 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
41 |
|
@@ -55,7 +64,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
55 |
|
56 |
agent = CodeAgent(
|
57 |
model=model,
|
58 |
-
tools=[final_answer], ## add your tools here (don't remove final answer)
|
59 |
max_steps=6,
|
60 |
verbosity_level=1,
|
61 |
grammar=None,
|
|
|
18 |
"""
|
19 |
return "What magic will you build ?"
|
20 |
|
21 |
+
# @tool
|
22 |
+
# def robotics_school_search(country: str) -> str:
|
23 |
+
# """A tool that the desired country of study and returns the best school to study robotics.
|
24 |
+
# Args:
|
25 |
+
# country: The country of study (e.g 'Italy', 'China', 'USA')
|
26 |
+
# """
|
27 |
+
# try:
|
28 |
+
|
29 |
+
|
30 |
@tool
|
31 |
def get_current_time_in_timezone(timezone: str) -> str:
|
32 |
"""A tool that fetches the current local time in a specified timezone.
|
|
|
44 |
|
45 |
|
46 |
final_answer = FinalAnswerTool()
|
47 |
+
web_search = DuckDuckGoSearchTool()
|
48 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
49 |
# model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
|
50 |
|
|
|
64 |
|
65 |
agent = CodeAgent(
|
66 |
model=model,
|
67 |
+
tools=[final_answer, get_current_time_in_timezone, web_search], ## add your tools here (don't remove final answer)
|
68 |
max_steps=6,
|
69 |
verbosity_level=1,
|
70 |
grammar=None,
|