Skip to content

Commit e34f046

Browse files
committed
Clean up fibonacci agent
1 parent 6b240b0 commit e34f046

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

cookbook/examples/agents/fib_calcs_agent.py renamed to cookbook/examples/agents/fibonacci_agent.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@
33
from agno.agent import Agent
44
from agno.models.openai import OpenAIChat
55
from agno.tools.calculator import CalculatorTools
6-
from agno.tools import tool
76

8-
def get_fibonacci_series(count: int = 5) -> int:
7+
def get_fibonacci_series(count: int = 5) -> str:
98
"""Generate a Fibonacci series up to the specified count."""
109
if count <= 0:
1110
return "Count must be a positive integer."
12-
11+
1312
fib_series = [0, 1]
1413
for i in range(2, count):
1514
fib_series.append(fib_series[-1] + fib_series[-2])
16-
15+
1716
return json.dumps(fib_series[:count])
1817

1918
agent = Agent(
@@ -26,13 +25,13 @@ def get_fibonacci_series(count: int = 5) -> int:
2625
exponentiate=True,
2726
is_prime=True
2827
)
29-
],
30-
show_tool_calls=True,
28+
],
29+
show_tool_calls=True,
3130
markdown=True
3231
)
3332

3433
agent.print_response("""
3534
1. Get 10 elements of fibonacci series
3635
2. Calculate the sum of cubes of the prime numbers in the series
3736
3. Subtract 4
38-
""", stream=True)
37+
""", stream=True)

0 commit comments

Comments
 (0)