Skip to content

Commit

Permalink
Update investment team
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Apr 9, 2024
1 parent ab9ddf3 commit c1b36a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cookbook/teams/investment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from phi.assistant.team import Assistant
from phi.tools.yfinance import YFinanceTools
from phi.tools.file import FileTools
from phi.llm.anthropic import Claude


reports_dir = Path(__file__).parent.parent.parent.joinpath("junk", "reports")
Expand All @@ -12,6 +13,7 @@

stock_analyst = Assistant(
name="Stock Analyst",
llm=Claude(model="claude-3-haiku-20240307"),
role="Get current stock price, analyst recommendations and news for a company.",
tools=[
YFinanceTools(stock_price=True, analyst_recommendations=True, company_news=True),
Expand All @@ -28,6 +30,7 @@
)
research_analyst = Assistant(
name="Research Analyst",
llm=Claude(model="claude-3-haiku-20240307"),
role="Writes research reports on stocks.",
tools=[FileTools(base_dir=reports_dir)],
description="You are an investment researcher analyst tasked with producing a ranked list of companies based on their investment potential.",
Expand Down Expand Up @@ -58,7 +61,7 @@
"If the research analyst has not completed the report, ask them to complete it before you can answer the users question.",
"Produce a nicely formatted response to the user, use markdown to format the response.",
],
debug_mode=True,
# debug_mode=True,
)
investment_lead.print_response(
"How would you invest $10000 in META, GOOG, NVDA and TSLA? Tell me the exact amount you'd invest in each.",
Expand Down
2 changes: 1 addition & 1 deletion cookbook/teams/journalist.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"The article should be extremely articulate and well written. "
"Focus on clarity, coherence, and overall quality.",
],
debug_mode=True,
# debug_mode=True,
markdown=True,
)
editor.print_response("Write an article about latest developments in AI.")

0 comments on commit c1b36a0

Please sign in to comment.