Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
ashpreetbedi committed Dec 11, 2024
1 parent 25d1fcf commit 2bb5643
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion cookbook/agents/02_finance_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
show_tool_calls=True,
markdown=True,
)
finance_agent.print_response("Summarize analyst recommendations for NVDA", stream=True)
finance_agent.print_response("Summarize and compare analyst recommendations for NVDA for TSLA", stream=True)
9 changes: 3 additions & 6 deletions cookbook/providers/google/finance_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
from phi.model.google import Gemini
from phi.tools.yfinance import YFinanceTools

agent = Agent(
finance_agent = Agent(
model=Gemini(id="gemini-2.0-flash-exp"),
tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, stock_fundamentals=True)],
instructions=["Use tables to display data"],
show_tool_calls=True,
description="You are an investment analyst that researches stocks and helps users make informed decisions.",
instructions=["Use tables to display data where possible."],
markdown=True,
)

# agent.print_response("Share the NVDA stock price and analyst recommendations", stream=True)
agent.print_response("Summarize fundamentals for TSLA", stream=True)
finance_agent.print_response("Summarize and compare analyst recommendations for NVDA for TSLA", stream=True)
11 changes: 3 additions & 8 deletions cookbook/providers/openai/finance_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@
from phi.model.openai import OpenAIChat
from phi.tools.yfinance import YFinanceTools

agent = Agent(
finance_agent = Agent(
model=OpenAIChat(id="gpt-4o"),
tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, stock_fundamentals=True)],
instructions=["Use tables to display data"],
show_tool_calls=True,
description="You are an investment analyst that researches stocks and helps users make informed decisions.",
instructions=["Use tables to display data where possible."],
markdown=True,
)

# agent.print_response("Share the NVDA stock price and analyst recommendations", stream=True)
agent.print_response(
"Summarize and compare analyst recommendations and fundamentals for TSLA and NVDA. Show in tables.", stream=True
)
finance_agent.print_response("Summarize and compare analyst recommendations for NVDA for TSLA", stream=True)

0 comments on commit 2bb5643

Please sign in to comment.