lam-ho commited on
Commit
adb4004
·
verified ·
1 Parent(s): 19b9935

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +35 -35
agent.py CHANGED
@@ -7,20 +7,20 @@ class add(Tool):
7
  This tool adds two integers together and returns an integer.
8
 
9
  Args:
10
- a: first int
11
- b: second int
12
  """
13
  inputs = {
14
  "a":{
15
- "type":"int",
16
- "description":"first int"
17
  },
18
  "b":{
19
- "type":"int",
20
- "description":"second int"
21
  }
22
  }
23
- output_type = "int"
24
 
25
  def forward(self, a: int, b: int):
26
  return a + b
@@ -32,20 +32,20 @@ class subtract(Tool):
32
  This tool subtracts two integers and returns an integer.
33
 
34
  Args:
35
- a: first int
36
- b: second int
37
  """
38
  inputs = {
39
  "a":{
40
- "type":"int",
41
- "description":"first int"
42
  },
43
  "b":{
44
- "type":"int",
45
- "description":"second int"
46
  }
47
  }
48
- output_type = "int"
49
 
50
  def forward(self, a: int, b: int):
51
  return a - b
@@ -56,20 +56,20 @@ class multiply(Tool):
56
  This tool multiplies two integers and returns an integer.
57
 
58
  Args:
59
- a: first int
60
- b: second int
61
  """
62
  inputs = {
63
  "a":{
64
- "type":"int",
65
- "description":"first int"
66
  },
67
  "b":{
68
- "type":"int",
69
- "description":"second int"
70
  }
71
  }
72
- output_type = "int"
73
 
74
  def forward(self, a: int, b: int):
75
  return a * b
@@ -80,20 +80,20 @@ class divide(Tool):
80
  This tool divides two integers and returns an integer.
81
 
82
  Args:
83
- a: first int
84
- b: second int
85
  """
86
  inputs = {
87
  "a":{
88
- "type":"int",
89
- "description":"first int"
90
  },
91
  "b":{
92
- "type":"int",
93
- "description":"second int"
94
  }
95
  }
96
- output_type = "int"
97
 
98
  def forward(self, a: int, b: int):
99
  if b == 0:
@@ -106,20 +106,20 @@ class modulo(Tool):
106
  This tool returns the modulus of two integers
107
 
108
  Args:
109
- a: first int
110
- b: second int
111
  """
112
  inputs = {
113
  "a":{
114
- "type":"int",
115
- "description":"first int"
116
  },
117
  "b":{
118
- "type":"int",
119
- "description":"second int"
120
  }
121
  }
122
- output_type = "int"
123
 
124
  def forward(self, a: int, b: int):
125
  return a % b
 
7
  This tool adds two integers together and returns an integer.
8
 
9
  Args:
10
+ a: first integer
11
+ b: second integer
12
  """
13
  inputs = {
14
  "a":{
15
+ "type":"integer",
16
+ "description":"first integer"
17
  },
18
  "b":{
19
+ "type":"integer",
20
+ "description":"second integer"
21
  }
22
  }
23
+ output_type = "integer"
24
 
25
  def forward(self, a: int, b: int):
26
  return a + b
 
32
  This tool subtracts two integers and returns an integer.
33
 
34
  Args:
35
+ a: first integer
36
+ b: second integer
37
  """
38
  inputs = {
39
  "a":{
40
+ "type":"integer",
41
+ "description":"first integer"
42
  },
43
  "b":{
44
+ "type":"integer",
45
+ "description":"second integer"
46
  }
47
  }
48
+ output_type = "integer"
49
 
50
  def forward(self, a: int, b: int):
51
  return a - b
 
56
  This tool multiplies two integers and returns an integer.
57
 
58
  Args:
59
+ a: first integer
60
+ b: second integer
61
  """
62
  inputs = {
63
  "a":{
64
+ "type":"integer",
65
+ "description":"first integer"
66
  },
67
  "b":{
68
+ "type":"integer",
69
+ "description":"second integer"
70
  }
71
  }
72
+ output_type = "integer"
73
 
74
  def forward(self, a: int, b: int):
75
  return a * b
 
80
  This tool divides two integers and returns an integer.
81
 
82
  Args:
83
+ a: first integer
84
+ b: second integer
85
  """
86
  inputs = {
87
  "a":{
88
+ "type":"integer",
89
+ "description":"first integer"
90
  },
91
  "b":{
92
+ "type":"integer",
93
+ "description":"second integer"
94
  }
95
  }
96
+ output_type = "integer"
97
 
98
  def forward(self, a: int, b: int):
99
  if b == 0:
 
106
  This tool returns the modulus of two integers
107
 
108
  Args:
109
+ a: first integer
110
+ b: second integer
111
  """
112
  inputs = {
113
  "a":{
114
+ "type":"integer",
115
+ "description":"first integer"
116
  },
117
  "b":{
118
+ "type":"integer",
119
+ "description":"second integer"
120
  }
121
  }
122
+ output_type = "integer"
123
 
124
  def forward(self, a: int, b: int):
125
  return a % b