rocapal commited on
Commit
34757eb
·
verified ·
1 Parent(s): 7b75f00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -1
app.py CHANGED
@@ -18,6 +18,21 @@ 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.
@@ -55,7 +70,7 @@ with open("prompts.yaml", 'r') as stream:
55
 
56
  agent = CodeAgent(
57
  model=model,
58
- tools=[final_answer, get_current_time_in_timezone], ## 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
+
22
+ @tool
23
+ def get_exam_days (call: str) -> str
24
+ """A tool that specify the examen days depending of the call
25
+ Args:
26
+ call: A string representing the call (e.g., 'ordinary, extraordinary, ...').
27
+ """
28
+
29
+ if call == "ordinary":
30
+ return f"The examm in the {call} call is 22 Enero"
31
+ elif call == "extraordinary":
32
+ return f"The examm in the {call} call is 14 Junio"
33
+ else:
34
+ return f"Call not recognized"
35
+
36
  @tool
37
  def get_current_time_in_timezone(timezone: str) -> str:
38
  """A tool that fetches the current local time in a specified timezone.
 
70
 
71
  agent = CodeAgent(
72
  model=model,
73
+ tools=[final_answer, get_current_time_in_timezone, get_exam_days], ## add your tools here (don't remove final answer)
74
  max_steps=6,
75
  verbosity_level=1,
76
  grammar=None,