CryptoSymbols come strumento da dare al team
This commit is contained in:
9570
resources/cryptos.csv
Normal file
9570
resources/cryptos.csv
Normal file
File diff suppressed because it is too large
Load Diff
@@ -120,7 +120,7 @@ class Pipeline:
|
|||||||
logging.info(f"[{run_id}] Pipeline query: {self.inputs.user_query}")
|
logging.info(f"[{run_id}] Pipeline query: {self.inputs.user_query}")
|
||||||
|
|
||||||
# Step 1: Crea gli agenti e il team
|
# Step 1: Crea gli agenti e il team
|
||||||
market_tool, news_tool, social_tool = self.get_tools()
|
market_tool, news_tool, social_tool = self.get_api_tools()
|
||||||
market_agent = self.inputs.team_model.get_agent(instructions=MARKET_INSTRUCTIONS, name="MarketAgent", tools=[market_tool])
|
market_agent = self.inputs.team_model.get_agent(instructions=MARKET_INSTRUCTIONS, name="MarketAgent", tools=[market_tool])
|
||||||
news_agent = self.inputs.team_model.get_agent(instructions=NEWS_INSTRUCTIONS, name="NewsAgent", tools=[news_tool])
|
news_agent = self.inputs.team_model.get_agent(instructions=NEWS_INSTRUCTIONS, name="NewsAgent", tools=[news_tool])
|
||||||
social_agent = self.inputs.team_model.get_agent(instructions=SOCIAL_INSTRUCTIONS, name="SocialAgent", tools=[social_tool])
|
social_agent = self.inputs.team_model.get_agent(instructions=SOCIAL_INSTRUCTIONS, name="SocialAgent", tools=[social_tool])
|
||||||
@@ -157,7 +157,7 @@ class Pipeline:
|
|||||||
# ======================
|
# ======================
|
||||||
# Helpers
|
# Helpers
|
||||||
# =====================
|
# =====================
|
||||||
def get_tools(self) -> tuple[MarketAPIsTool, NewsAPIsTool, SocialAPIsTool]:
|
def get_api_tools(self) -> tuple[MarketAPIsTool, NewsAPIsTool, SocialAPIsTool]:
|
||||||
"""
|
"""
|
||||||
Restituisce la lista di tools disponibili per gli agenti.
|
Restituisce la lista di tools disponibili per gli agenti.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
from app.api.tools.market_tool import MarketAPIsTool
|
from app.api.tools.market_tool import MarketAPIsTool
|
||||||
from app.api.tools.social_tool import SocialAPIsTool
|
from app.api.tools.social_tool import SocialAPIsTool
|
||||||
from app.api.tools.news_tool import NewsAPIsTool
|
from app.api.tools.news_tool import NewsAPIsTool
|
||||||
|
from app.api.tools.symbols_tool import CryptoSymbols
|
||||||
|
|
||||||
__all__ = ["MarketAPIsTool", "NewsAPIsTool", "SocialAPIsTool"]
|
__all__ = ["MarketAPIsTool", "NewsAPIsTool", "SocialAPIsTool", "CryptoSymbols"]
|
||||||
@@ -18,7 +18,7 @@ class CryptoSymbols(Toolkit):
|
|||||||
Classe per ottenere i simboli delle criptovalute tramite Yahoo Finance.
|
Classe per ottenere i simboli delle criptovalute tramite Yahoo Finance.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, cache_file: str = 'cryptos.csv'):
|
def __init__(self, cache_file: str = 'resources/cryptos.csv'):
|
||||||
self.cache_file = cache_file
|
self.cache_file = cache_file
|
||||||
self.final_table = pd.read_csv(self.cache_file) if os.path.exists(self.cache_file) else pd.DataFrame() # type: ignore
|
self.final_table = pd.read_csv(self.cache_file) if os.path.exists(self.cache_file) else pd.DataFrame() # type: ignore
|
||||||
Toolkit.__init__(self, # type: ignore
|
Toolkit.__init__(self, # type: ignore
|
||||||
|
|||||||
Reference in New Issue
Block a user