omidai commited on
Commit
9bc4765
·
verified ·
1 Parent(s): 91ef539

Update the fibonachi function

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -8,16 +8,15 @@ from tools.final_answer import FinalAnswerTool
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
- def fibonacci(arg1:str) -> str:
12
  """A tool that get a position n, and tell you the Fibonacci number at that position in the sequence.
13
  Args:
14
- arg1: the position
15
  """
16
- number = int(n)
17
  a, b = 0, 1
18
- for _ in range(number):
19
  a, b = b, a + b
20
- return str(a)
21
 
22
 
23
  @tool
 
8
  from Gradio_UI import GradioUI
9
 
10
  @tool
11
+ def fibonacci(position:int) -> int:
12
  """A tool that get a position n, and tell you the Fibonacci number at that position in the sequence.
13
  Args:
14
+ position: the position
15
  """
 
16
  a, b = 0, 1
17
+ for _ in range(position):
18
  a, b = b, a + b
19
+ return a
20
 
21
 
22
  @tool