vbafna commited on
Commit
d9c63d3
·
verified ·
1 Parent(s): 672389f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -15
app.py CHANGED
@@ -7,20 +7,6 @@ from tools.final_answer import FinalAnswerTool
7
 
8
  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 my_calculator(num_1:int, num_2:int)-> int: #it's import to specify the return type
13
- #Keep this format for the description / args / args description but feel free to modify the tool
14
- """A calculator that performs multiplication.
15
- Args:
16
- num_1: An integer.
17
- num_2: An interger.
18
- """
19
- try:
20
- return num_1*num_2
21
- except Exception as e:
22
- return "Error multiplying."
23
-
24
  @tool
25
  def get_current_time_in_timezone(timezone: str) -> str:
26
  """A tool that fetches the current local time in a specified timezone.
@@ -58,7 +44,7 @@ with open("prompts.yaml", 'r') as stream:
58
 
59
  agent = CodeAgent(
60
  model=model,
61
- tools=[final_answer],[my_calculator], ## add your tools here (don't remove final answer)
62
  max_steps=6,
63
  verbosity_level=1,
64
  grammar=None,
 
7
 
8
  from Gradio_UI import GradioUI
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  @tool
11
  def get_current_time_in_timezone(timezone: str) -> str:
12
  """A tool that fetches the current local time in a specified timezone.
 
44
 
45
  agent = CodeAgent(
46
  model=model,
47
+ tools=[final_answer], ## add your tools here (don't remove final answer)
48
  max_steps=6,
49
  verbosity_level=1,
50
  grammar=None,