from phi.agent import Agent
from phi.model.groq import Groq
from phi.tools.yfinance import YFinanceTools
from phi.tools.duckduckgo import DuckDuckGo
import groq
import os
from dotenv import load_dotenv
load_dotenv()
web_search_agent=Agent(
name="Web Search Agent",
role="Search the web for the information",
model=Groq(groq_api_key=os.getenv("GROQ_API_KEY"),id="llama3-70b-8192"),
tools=[DuckDuckGo()],
instructions=["Alway include sources"],
show_tools_calls=True,
markdown=True,
)
finance_agent=Agent(
name="Finance AI Agent",
model=Groq(groq_api_key=os.getenv("GROQ_API_KEY"),id="llama3-70b-8192"),
tools=[
YFinanceTools(stock_price=True, analyst_recommendations=True, stock_fundamentals=True,
company_news=True),
],
instructions=["Use tables to display the data"],
show_tool_calls=True,
markdown=True,
)
multi_ai_agent=Agent(
model=Groq(groq_api_key=os.getenv("GROQ_API_KEY"),id="llama3-70b-8192"),
team=[web_search_agent,finance_agent],
instructions=["Always include sources","Use table to display the data"],
show_tool_calls=True,
markdown=True,
)
company_name = input("Enter the company name: ")
multi_ai_agent.print_response(f"Summarize analyst recommendation and share the latest news for {company_name}", stream=True)
There are no models linked
There are no models linked
There are no datasets linked
There are no datasets linked