A curated collection of practical AI projects implementing OCR systems, RAG, AI agents, and other AI use cases.
fix(multi_agent_financial_analyst): remove unresolved merge conflict markers
Rudy Celeklicbc0efaf7886
diff --git a/ai_agents/multi_agent_financial_analyst/financial_analyst.py b/ai_agents/multi_agent_financial_analyst/financial_analyst.pyindex 641bd61..e5b4fb5 100644--- a/ai_agents/multi_agent_financial_analyst/financial_analyst.py+++ b/ai_agents/multi_agent_financial_analyst/financial_analyst.py@@ -1,7 +1,4 @@-<<<<<<< HEAD-======="""Streamlit app that runs a multi-agent CrewAI pipeline to analyze a stock and generate a markdown investment report."""->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4aimport streamlit as stimport osimport pandas as pd@@ -27,14 +24,6 @@ class StockAnalysis(BaseModel):technical_indicators: dictfundamental_metrics: dict-<<<<<<< HEAD-# Initialize SambaNova LLM[email protected]_resource-def load_llm():- return LLM(- model="sambanova/Llama-4-Maverick-17B-128E-Instruct",- api_key=os.getenv("SAMBANOVA_API_KEY"),-=======# Initialize Orq.ai LLM@st.cache_resourcedef load_llm():@@ -43,16 +32,12 @@ def load_llm():model="openai/alibaba/qwen3.6-flash",base_url="https://api.orq.ai/v3/router",api_key=os.getenv("ORQ_API_KEY"),->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4atemperature=0.3)# Create agents and tasksdef create_agents_and_tasks(symbol: str):-<<<<<<< HEAD-======="""Build the stock analysis and report writing agents, their tasks, and the crew that runs them for the given symbol."""->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4allm = load_llm()# Initialize tools@@ -189,19 +174,6 @@ st.title("🎯 Multi-Agent AI Financial Analyst")# Sidebarwith st.sidebar:st.header("Configuration")-<<<<<<< HEAD-- # API Key input- api_key = st.text_input(- "SambaNova API Key",- type="password",- value=os.getenv("SAMBANOVA_API_KEY", ""),- help="Enter your SambaNova API key"- )- if api_key:- os.environ["SAMBANOVA_API_KEY"] = api_key-=======->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a# Stock Symbol inputsymbol = st.text_input(diff --git a/ai_agents/multi_agent_financial_analyst/requirements.txt b/ai_agents/multi_agent_financial_analyst/requirements.txtindex 2a54162..4f4fc25 100644--- a/ai_agents/multi_agent_financial_analyst/requirements.txt+++ b/ai_agents/multi_agent_financial_analyst/requirements.txt@@ -4,10 +4,6 @@ python-dotenv>=1.0.0pydantic>=2.5.0yfinance>=0.2.35pandas>=2.1.0-<<<<<<< HEAD-plotly>=5.18.0-=======plotly>=5.18.0openai>=1.0.0litellm>=1.0.0->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4adiff --git a/ai_agents/multi_agent_financial_analyst/tools/financial_tools.py b/ai_agents/multi_agent_financial_analyst/tools/financial_tools.pyindex cd75154..b9f42da 100644--- a/ai_agents/multi_agent_financial_analyst/tools/financial_tools.py+++ b/ai_agents/multi_agent_financial_analyst/tools/financial_tools.py@@ -9,10 +9,7 @@ class StockInput(BaseModel):symbol: str = Field(..., description="The stock symbol to analyze (e.g., 'AAPL', 'GOOGL')")class YFinanceStockTool(BaseTool):-<<<<<<< HEAD-======="""CrewAI tool that fetches real-time and historical stock data from Yahoo Finance."""->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4aname: str = "stock_data_tool"description: str = """A tool for getting real-time and historical stock market data.@@ -26,10 +23,7 @@ class YFinanceStockTool(BaseTool):args_schema: type[BaseModel] = StockInputdef _run(self, symbol: str) -> str:-<<<<<<< HEAD-======="""Fetch latest trading data, 52-week range, and key financial metrics for the given stock symbol."""->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4atry:stock = yf.Ticker(symbol)@@ -78,9 +72,6 @@ class YFinanceStockTool(BaseTool):return f"Error fetching data for {symbol}: {str(e)}"def _arun(self, symbol: str) -> str:-<<<<<<< HEAD-======="""Async counterpart of _run, not implemented for this tool."""->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a# Async implementation if neededraise NotImplementedError("Async version not implemented")\ No newline at end of file