syaffers commited on
Commit
3f500f9
·
1 Parent(s): 96fc622

feat: add adder

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -8,18 +8,15 @@ from Gradio_UI import GradioUI
8
  from tools.final_answer import FinalAnswerTool
9
 
10
 
11
- # Below is an example of a tool that does nothing. Amaze us with your creativity !
12
  @tool
13
- def my_custom_tool(
14
- arg1: str, arg2: int
15
- ) -> str: # it's import to specify the return type
16
- # Keep this format for the description / args / args description but feel free to modify the tool
17
- """A tool that does nothing yet
18
  Args:
19
- arg1: the first argument
20
- arg2: the second argument
21
  """
22
- return "What magic will you build ?"
23
 
24
 
25
  @tool
@@ -61,7 +58,7 @@ tools = [
61
 
62
  agent = CodeAgent(
63
  model=model,
64
- tools=tools, ## add your tools here (don't remove final answer)
65
  max_steps=6,
66
  verbosity_level=1,
67
  grammar=None,
 
8
  from tools.final_answer import FinalAnswerTool
9
 
10
 
 
11
  @tool
12
+ def add_two_numbers(num_1: int, num_2: int) -> str:
13
+ """A tool that adds two numbers together.
14
+
 
 
15
  Args:
16
+ num_1: the first number.
17
+ num_2: the second number.
18
  """
19
+ return str(num_1 + num_2)
20
 
21
 
22
  @tool
 
58
 
59
  agent = CodeAgent(
60
  model=model,
61
+ tools=tools,
62
  max_steps=6,
63
  verbosity_level=1,
64
  grammar=None,