Spaces:
Running
Running
Commit
·
a267ed2
1
Parent(s):
bb2e7f7
StockAnalyst: initialize TickerFinder as attribute
Browse files
src/stock_analysis_agent.py
CHANGED
|
@@ -14,6 +14,7 @@ from pydantic import BaseModel, Field
|
|
| 14 |
|
| 15 |
from src.technical_analysis import TechnicalAnalysis
|
| 16 |
from src.fundamental_analysis import FundamentalAnalysis
|
|
|
|
| 17 |
|
| 18 |
@tool
|
| 19 |
def get_stock_prices(
|
|
@@ -88,10 +89,13 @@ class StockAnalyst():
|
|
| 88 |
# load the env variables fom .env file
|
| 89 |
dotenv.load_dotenv(dotenv.find_dotenv())
|
| 90 |
|
|
|
|
|
|
|
|
|
|
| 91 |
# build the graph
|
| 92 |
self.graph = self.build_graph()
|
| 93 |
|
| 94 |
-
self.logger.info('Initialized StockAnalyst object and built the agent graph.')
|
| 95 |
|
| 96 |
def get_prompt(
|
| 97 |
self,
|
|
|
|
| 14 |
|
| 15 |
from src.technical_analysis import TechnicalAnalysis
|
| 16 |
from src.fundamental_analysis import FundamentalAnalysis
|
| 17 |
+
from src.ticker_finder import TickerFinder
|
| 18 |
|
| 19 |
@tool
|
| 20 |
def get_stock_prices(
|
|
|
|
| 89 |
# load the env variables fom .env file
|
| 90 |
dotenv.load_dotenv(dotenv.find_dotenv())
|
| 91 |
|
| 92 |
+
# initialize the tickerfinder
|
| 93 |
+
self.tickerfinder = TickerFinder()
|
| 94 |
+
|
| 95 |
# build the graph
|
| 96 |
self.graph = self.build_graph()
|
| 97 |
|
| 98 |
+
self.logger.info('Initialized StockAnalyst object with TickerFinder and built the agent graph.')
|
| 99 |
|
| 100 |
def get_prompt(
|
| 101 |
self,
|