Fix tool issues
This commit is contained in:
parent
2ee2dc2382
commit
22616e8bdb
|
|
@ -217,3 +217,6 @@ __marimo__/
|
|||
|
||||
# Cache
|
||||
**/data_cache/
|
||||
|
||||
# Report
|
||||
**/reports/
|
||||
|
|
@ -2,6 +2,7 @@ from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
|||
import time
|
||||
import json
|
||||
from tradingagents.agents.utils.agent_utils import get_fundamentals, get_balance_sheet, get_cashflow, get_income_statement, get_insider_transactions
|
||||
from tradingagents.agents.utils.data_prefetch import prefetch_fundamentals_data, format_fundamentals_context
|
||||
from tradingagents.dataflows.config import get_config
|
||||
|
||||
|
||||
|
|
@ -11,6 +12,10 @@ def create_fundamentals_analyst(llm):
|
|||
ticker = state["company_of_interest"]
|
||||
company_name = state["company_of_interest"]
|
||||
|
||||
# Pre-fetch data so it's available even if the backend doesn't support tool calling
|
||||
prefetched = prefetch_fundamentals_data(ticker, current_date)
|
||||
data_context = format_fundamentals_context(prefetched)
|
||||
|
||||
tools = [
|
||||
get_fundamentals,
|
||||
get_balance_sheet,
|
||||
|
|
@ -21,7 +26,7 @@ def create_fundamentals_analyst(llm):
|
|||
system_message = (
|
||||
"You are a researcher tasked with analyzing fundamental information over the past week about a company. Please write a comprehensive report of the company's fundamental information such as financial documents, company profile, basic company financials, and company financial history to gain a full view of the company's fundamental information to inform traders. Make sure to include as much detail as possible. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
+ " Make sure to append a Markdown table at the end of the report to organize key points in the report, organized and easy to read."
|
||||
+ " Use the available tools: `get_fundamentals` for comprehensive company analysis, `get_balance_sheet`, `get_cashflow`, and `get_income_statement` for specific financial statements.",
|
||||
+ " Use the provided financial data below for your analysis. If you have access to callable tools (`get_fundamentals`, `get_balance_sheet`, `get_cashflow`, `get_income_statement`), you may use them for additional data.",
|
||||
)
|
||||
|
||||
prompt = ChatPromptTemplate.from_messages(
|
||||
|
|
@ -29,22 +34,22 @@ def create_fundamentals_analyst(llm):
|
|||
(
|
||||
"system",
|
||||
"You are a helpful AI assistant, collaborating with other assistants."
|
||||
" Use the provided tools to progress towards answering the question."
|
||||
" If you are unable to fully answer, that's OK; another assistant with different tools"
|
||||
" will help where you left off. Execute what you can to make progress."
|
||||
" Use the provided data below to write your analysis report."
|
||||
" If you have access to callable tools, you may use them for additional data."
|
||||
" If you or any other assistant has the FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** or deliverable,"
|
||||
" prefix your response with FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** so the team knows to stop."
|
||||
" You have access to the following tools: {tool_names}.\n{system_message}"
|
||||
"For your reference, the current date is {current_date}. The company we want to look at is {ticker}",
|
||||
"\n{system_message}"
|
||||
"\nFor your reference, the current date is {current_date}. The company we want to look at is {ticker}"
|
||||
"\n\n--- PRE-FETCHED FUNDAMENTALS DATA ---\n{data_context}\n--- END PRE-FETCHED DATA ---",
|
||||
),
|
||||
MessagesPlaceholder(variable_name="messages"),
|
||||
]
|
||||
)
|
||||
|
||||
prompt = prompt.partial(system_message=system_message)
|
||||
prompt = prompt.partial(tool_names=", ".join([tool.name for tool in tools]))
|
||||
prompt = prompt.partial(current_date=current_date)
|
||||
prompt = prompt.partial(ticker=ticker)
|
||||
prompt = prompt.partial(data_context=data_context)
|
||||
|
||||
chain = prompt | llm.bind_tools(tools)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
|||
import time
|
||||
import json
|
||||
from tradingagents.agents.utils.agent_utils import get_stock_data, get_indicators
|
||||
from tradingagents.agents.utils.data_prefetch import prefetch_market_data, format_market_context
|
||||
from tradingagents.dataflows.config import get_config
|
||||
|
||||
|
||||
|
|
@ -12,13 +13,17 @@ def create_market_analyst(llm):
|
|||
ticker = state["company_of_interest"]
|
||||
company_name = state["company_of_interest"]
|
||||
|
||||
# Pre-fetch data so it's available even if the backend doesn't support tool calling
|
||||
prefetched = prefetch_market_data(ticker, current_date)
|
||||
data_context = format_market_context(prefetched)
|
||||
|
||||
tools = [
|
||||
get_stock_data,
|
||||
get_indicators,
|
||||
]
|
||||
|
||||
system_message = (
|
||||
"""You are a trading assistant tasked with analyzing financial markets. Your role is to select the **most relevant indicators** for a given market condition or trading strategy from the following list. The goal is to choose up to **8 indicators** that provide complementary insights without redundancy. Categories and each category's indicators are:
|
||||
"""You are a trading assistant tasked with analyzing financial markets. Your role is to analyze the provided stock data and technical indicators to write a comprehensive market analysis report. Focus on the **most relevant indicators** for the current market condition. Categories and each category's indicators are:
|
||||
|
||||
Moving Averages:
|
||||
- close_50_sma: 50 SMA: A medium-term trend indicator. Usage: Identify trend direction and serve as dynamic support/resistance. Tips: It lags price; combine with faster indicators for timely signals.
|
||||
|
|
@ -42,7 +47,7 @@ Volatility Indicators:
|
|||
Volume-Based Indicators:
|
||||
- vwma: VWMA: A moving average weighted by volume. Usage: Confirm trends by integrating price action with volume data. Tips: Watch for skewed results from volume spikes; use in combination with other volume analyses.
|
||||
|
||||
- Select indicators that provide diverse and complementary information. Avoid redundancy (e.g., do not select both rsi and stochrsi). Also briefly explain why they are suitable for the given market context. When you tool call, please use the exact name of the indicators provided above as they are defined parameters, otherwise your call will fail. Please make sure to call get_stock_data first to retrieve the CSV that is needed to generate indicators. Then use get_indicators with the specific indicator names. Write a very detailed and nuanced report of the trends you observe. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."""
|
||||
- Select up to 8 indicators that provide diverse and complementary information. Avoid redundancy. Also briefly explain why they are suitable for the given market context. If you have access to tools (get_stock_data, get_indicators), you may use them for additional data beyond what is pre-fetched. Write a very detailed and nuanced report of the trends you observe. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."""
|
||||
+ """ Make sure to append a Markdown table at the end of the report to organize key points in the report, organized and easy to read."""
|
||||
)
|
||||
|
||||
|
|
@ -51,23 +56,25 @@ Volume-Based Indicators:
|
|||
(
|
||||
"system",
|
||||
"You are a helpful AI assistant, collaborating with other assistants."
|
||||
" Use the provided tools to progress towards answering the question."
|
||||
" If you are unable to fully answer, that's OK; another assistant with different tools"
|
||||
" will help where you left off. Execute what you can to make progress."
|
||||
" Use the provided data below to write your analysis report."
|
||||
" If you have access to callable tools, you may use them for additional data."
|
||||
" If you or any other assistant has the FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** or deliverable,"
|
||||
" prefix your response with FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** so the team knows to stop."
|
||||
" You have access to the following tools: {tool_names}.\n{system_message}"
|
||||
"For your reference, the current date is {current_date}. The company we want to look at is {ticker}",
|
||||
"\n{system_message}"
|
||||
"\nFor your reference, the current date is {current_date}. The company we want to look at is {ticker}"
|
||||
"\n\n--- PRE-FETCHED MARKET DATA ---\n{data_context}\n--- END PRE-FETCHED DATA ---",
|
||||
),
|
||||
MessagesPlaceholder(variable_name="messages"),
|
||||
]
|
||||
)
|
||||
|
||||
prompt = prompt.partial(system_message=system_message)
|
||||
prompt = prompt.partial(tool_names=", ".join([tool.name for tool in tools]))
|
||||
prompt = prompt.partial(current_date=current_date)
|
||||
prompt = prompt.partial(ticker=ticker)
|
||||
prompt = prompt.partial(data_context=data_context)
|
||||
|
||||
# Try with tools bound (works with tool-capable backends)
|
||||
# Falls back gracefully: if LLM can't call tools, it uses pre-fetched data
|
||||
chain = prompt | llm.bind_tools(tools)
|
||||
|
||||
result = chain.invoke(state["messages"])
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
|||
import time
|
||||
import json
|
||||
from tradingagents.agents.utils.agent_utils import get_news, get_global_news
|
||||
from tradingagents.agents.utils.data_prefetch import prefetch_news_data, format_news_context
|
||||
from tradingagents.dataflows.config import get_config
|
||||
|
||||
|
||||
|
|
@ -10,13 +11,17 @@ def create_news_analyst(llm):
|
|||
current_date = state["trade_date"]
|
||||
ticker = state["company_of_interest"]
|
||||
|
||||
# Pre-fetch data so it's available even if the backend doesn't support tool calling
|
||||
prefetched = prefetch_news_data(ticker, current_date)
|
||||
data_context = format_news_context(prefetched)
|
||||
|
||||
tools = [
|
||||
get_news,
|
||||
get_global_news,
|
||||
]
|
||||
|
||||
system_message = (
|
||||
"You are a news researcher tasked with analyzing recent news and trends over the past week. Please write a comprehensive report of the current state of the world that is relevant for trading and macroeconomics. Use the available tools: get_news(query, start_date, end_date) for company-specific or targeted news searches, and get_global_news(curr_date, look_back_days, limit) for broader macroeconomic news. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
"You are a news researcher tasked with analyzing recent news and trends over the past week. Please write a comprehensive report of the current state of the world that is relevant for trading and macroeconomics. Use the provided news data below for your analysis. If you have access to callable tools (get_news, get_global_news), you may use them for additional data. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
+ """ Make sure to append a Markdown table at the end of the report to organize key points in the report, organized and easy to read."""
|
||||
)
|
||||
|
||||
|
|
@ -25,22 +30,22 @@ def create_news_analyst(llm):
|
|||
(
|
||||
"system",
|
||||
"You are a helpful AI assistant, collaborating with other assistants."
|
||||
" Use the provided tools to progress towards answering the question."
|
||||
" If you are unable to fully answer, that's OK; another assistant with different tools"
|
||||
" will help where you left off. Execute what you can to make progress."
|
||||
" Use the provided data below to write your analysis report."
|
||||
" If you have access to callable tools, you may use them for additional data."
|
||||
" If you or any other assistant has the FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** or deliverable,"
|
||||
" prefix your response with FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** so the team knows to stop."
|
||||
" You have access to the following tools: {tool_names}.\n{system_message}"
|
||||
"For your reference, the current date is {current_date}. We are looking at the company {ticker}",
|
||||
"\n{system_message}"
|
||||
"\nFor your reference, the current date is {current_date}. We are looking at the company {ticker}"
|
||||
"\n\n--- PRE-FETCHED NEWS DATA ---\n{data_context}\n--- END PRE-FETCHED DATA ---",
|
||||
),
|
||||
MessagesPlaceholder(variable_name="messages"),
|
||||
]
|
||||
)
|
||||
|
||||
prompt = prompt.partial(system_message=system_message)
|
||||
prompt = prompt.partial(tool_names=", ".join([tool.name for tool in tools]))
|
||||
prompt = prompt.partial(current_date=current_date)
|
||||
prompt = prompt.partial(ticker=ticker)
|
||||
prompt = prompt.partial(data_context=data_context)
|
||||
|
||||
chain = prompt | llm.bind_tools(tools)
|
||||
result = chain.invoke(state["messages"])
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
|||
import time
|
||||
import json
|
||||
from tradingagents.agents.utils.agent_utils import get_news
|
||||
from tradingagents.agents.utils.data_prefetch import prefetch_social_data, format_social_context
|
||||
from tradingagents.dataflows.config import get_config
|
||||
|
||||
|
||||
|
|
@ -11,12 +12,16 @@ def create_social_media_analyst(llm):
|
|||
ticker = state["company_of_interest"]
|
||||
company_name = state["company_of_interest"]
|
||||
|
||||
# Pre-fetch data so it's available even if the backend doesn't support tool calling
|
||||
prefetched = prefetch_social_data(ticker, current_date)
|
||||
data_context = format_social_context(prefetched)
|
||||
|
||||
tools = [
|
||||
get_news,
|
||||
]
|
||||
|
||||
system_message = (
|
||||
"You are a social media and company specific news researcher/analyst tasked with analyzing social media posts, recent company news, and public sentiment for a specific company over the past week. You will be given a company's name your objective is to write a comprehensive long report detailing your analysis, insights, and implications for traders and investors on this company's current state after looking at social media and what people are saying about that company, analyzing sentiment data of what people feel each day about the company, and looking at recent company news. Use the get_news(query, start_date, end_date) tool to search for company-specific news and social media discussions. Try to look at all sources possible from social media to sentiment to news. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
"You are a social media and company specific news researcher/analyst tasked with analyzing social media posts, recent company news, and public sentiment for a specific company over the past week. You will be given a company's name your objective is to write a comprehensive long report detailing your analysis, insights, and implications for traders and investors on this company's current state after looking at social media and what people are saying about that company, analyzing sentiment data of what people feel each day about the company, and looking at recent company news. Use the provided news data below for your analysis. If you have access to callable tools (get_news), you may use them for additional data. Try to look at all sources possible from social media to sentiment to news. Do not simply state the trends are mixed, provide detailed and finegrained analysis and insights that may help traders make decisions."
|
||||
+ """ Make sure to append a Markdown table at the end of the report to organize key points in the report, organized and easy to read.""",
|
||||
)
|
||||
|
||||
|
|
@ -25,22 +30,22 @@ def create_social_media_analyst(llm):
|
|||
(
|
||||
"system",
|
||||
"You are a helpful AI assistant, collaborating with other assistants."
|
||||
" Use the provided tools to progress towards answering the question."
|
||||
" If you are unable to fully answer, that's OK; another assistant with different tools"
|
||||
" will help where you left off. Execute what you can to make progress."
|
||||
" Use the provided data below to write your analysis report."
|
||||
" If you have access to callable tools, you may use them for additional data."
|
||||
" If you or any other assistant has the FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** or deliverable,"
|
||||
" prefix your response with FINAL TRANSACTION PROPOSAL: **BUY/HOLD/SELL** so the team knows to stop."
|
||||
" You have access to the following tools: {tool_names}.\n{system_message}"
|
||||
"For your reference, the current date is {current_date}. The current company we want to analyze is {ticker}",
|
||||
"\n{system_message}"
|
||||
"\nFor your reference, the current date is {current_date}. The current company we want to analyze is {ticker}"
|
||||
"\n\n--- PRE-FETCHED SOCIAL/NEWS DATA ---\n{data_context}\n--- END PRE-FETCHED DATA ---",
|
||||
),
|
||||
MessagesPlaceholder(variable_name="messages"),
|
||||
]
|
||||
)
|
||||
|
||||
prompt = prompt.partial(system_message=system_message)
|
||||
prompt = prompt.partial(tool_names=", ".join([tool.name for tool in tools]))
|
||||
prompt = prompt.partial(current_date=current_date)
|
||||
prompt = prompt.partial(ticker=ticker)
|
||||
prompt = prompt.partial(data_context=data_context)
|
||||
|
||||
chain = prompt | llm.bind_tools(tools)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,195 @@
|
|||
"""
|
||||
Pre-fetches data for analyst nodes so they don't depend on LLM tool calling.
|
||||
|
||||
This module calls the same underlying data functions that the tools use,
|
||||
but invokes them directly. The fetched data is injected into the analyst
|
||||
prompt so the LLM can analyze it in a single pass.
|
||||
|
||||
This approach works with all backends, including proxies that don't
|
||||
support OpenAI-style tool calling (e.g., claude-max-api-proxy).
|
||||
"""
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from tradingagents.dataflows.interface import route_to_vendor
|
||||
|
||||
|
||||
def prefetch_market_data(ticker: str, trade_date: str) -> dict:
|
||||
"""Pre-fetch stock data and technical indicators for the market analyst.
|
||||
|
||||
Returns a dict with 'stock_data' and 'indicators' keys.
|
||||
"""
|
||||
results = {}
|
||||
|
||||
# Fetch stock data for the past 30 days
|
||||
end_date = trade_date
|
||||
start_dt = datetime.strptime(trade_date, "%Y-%m-%d") - timedelta(days=30)
|
||||
start_date = start_dt.strftime("%Y-%m-%d")
|
||||
|
||||
try:
|
||||
results["stock_data"] = route_to_vendor(
|
||||
"get_stock_data", ticker, start_date, end_date
|
||||
)
|
||||
except Exception as e:
|
||||
results["stock_data"] = f"Error fetching stock data: {e}"
|
||||
|
||||
# Fetch key technical indicators
|
||||
default_indicators = [
|
||||
"rsi", "macd", "macdh", "macds",
|
||||
"boll", "boll_ub", "boll_lb",
|
||||
"close_50_sma", "close_200_sma",
|
||||
"close_10_ema", "atr", "vwma",
|
||||
]
|
||||
indicator_results = {}
|
||||
for indicator in default_indicators:
|
||||
try:
|
||||
value = route_to_vendor(
|
||||
"get_indicators", ticker, indicator, trade_date, 14
|
||||
)
|
||||
indicator_results[indicator] = value
|
||||
except Exception as e:
|
||||
indicator_results[indicator] = f"Error: {e}"
|
||||
results["indicators"] = indicator_results
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def prefetch_news_data(ticker: str, trade_date: str) -> dict:
|
||||
"""Pre-fetch news data for the news analyst.
|
||||
|
||||
Returns a dict with 'ticker_news' and 'global_news' keys.
|
||||
"""
|
||||
results = {}
|
||||
start_dt = datetime.strptime(trade_date, "%Y-%m-%d") - timedelta(days=7)
|
||||
start_date = start_dt.strftime("%Y-%m-%d")
|
||||
|
||||
try:
|
||||
results["ticker_news"] = route_to_vendor(
|
||||
"get_news", ticker, start_date, trade_date
|
||||
)
|
||||
except Exception as e:
|
||||
results["ticker_news"] = f"Error fetching news: {e}"
|
||||
|
||||
try:
|
||||
results["global_news"] = route_to_vendor(
|
||||
"get_global_news", trade_date, 7, 10
|
||||
)
|
||||
except Exception as e:
|
||||
results["global_news"] = f"Error fetching global news: {e}"
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def prefetch_social_data(ticker: str, trade_date: str) -> dict:
|
||||
"""Pre-fetch data for the social media analyst.
|
||||
|
||||
Returns a dict with 'ticker_news' key.
|
||||
"""
|
||||
results = {}
|
||||
start_dt = datetime.strptime(trade_date, "%Y-%m-%d") - timedelta(days=7)
|
||||
start_date = start_dt.strftime("%Y-%m-%d")
|
||||
|
||||
try:
|
||||
results["ticker_news"] = route_to_vendor(
|
||||
"get_news", ticker, start_date, trade_date
|
||||
)
|
||||
except Exception as e:
|
||||
results["ticker_news"] = f"Error fetching news: {e}"
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def prefetch_fundamentals_data(ticker: str, trade_date: str) -> dict:
|
||||
"""Pre-fetch fundamental data for the fundamentals analyst.
|
||||
|
||||
Returns a dict with keys for each financial data type.
|
||||
"""
|
||||
results = {}
|
||||
|
||||
try:
|
||||
results["fundamentals"] = route_to_vendor(
|
||||
"get_fundamentals", ticker, trade_date
|
||||
)
|
||||
except Exception as e:
|
||||
results["fundamentals"] = f"Error fetching fundamentals: {e}"
|
||||
|
||||
try:
|
||||
results["balance_sheet"] = route_to_vendor(
|
||||
"get_balance_sheet", ticker, "quarterly", trade_date
|
||||
)
|
||||
except Exception as e:
|
||||
results["balance_sheet"] = f"Error fetching balance sheet: {e}"
|
||||
|
||||
try:
|
||||
results["cashflow"] = route_to_vendor(
|
||||
"get_cashflow", ticker, "quarterly", trade_date
|
||||
)
|
||||
except Exception as e:
|
||||
results["cashflow"] = f"Error fetching cashflow: {e}"
|
||||
|
||||
try:
|
||||
results["income_statement"] = route_to_vendor(
|
||||
"get_income_statement", ticker, "quarterly", trade_date
|
||||
)
|
||||
except Exception as e:
|
||||
results["income_statement"] = f"Error fetching income statement: {e}"
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def format_market_context(data: dict) -> str:
|
||||
"""Format pre-fetched market data into a context string for the LLM."""
|
||||
parts = []
|
||||
|
||||
if data.get("stock_data"):
|
||||
parts.append(f"## Stock Price Data (OHLCV)\n{data['stock_data']}")
|
||||
|
||||
if data.get("indicators"):
|
||||
parts.append("## Technical Indicators")
|
||||
for indicator, value in data["indicators"].items():
|
||||
parts.append(f"### {indicator}\n{value}")
|
||||
|
||||
return "\n\n".join(parts)
|
||||
|
||||
|
||||
def format_news_context(data: dict) -> str:
|
||||
"""Format pre-fetched news data into a context string for the LLM."""
|
||||
parts = []
|
||||
|
||||
if data.get("ticker_news"):
|
||||
parts.append(f"## Company-Specific News\n{data['ticker_news']}")
|
||||
|
||||
if data.get("global_news"):
|
||||
parts.append(f"## Global Market News\n{data['global_news']}")
|
||||
|
||||
return "\n\n".join(parts)
|
||||
|
||||
|
||||
def format_social_context(data: dict) -> str:
|
||||
"""Format pre-fetched social data into a context string for the LLM."""
|
||||
parts = []
|
||||
|
||||
if data.get("ticker_news"):
|
||||
parts.append(
|
||||
f"## Company News & Social Media Discussions\n{data['ticker_news']}"
|
||||
)
|
||||
|
||||
return "\n\n".join(parts)
|
||||
|
||||
|
||||
def format_fundamentals_context(data: dict) -> str:
|
||||
"""Format pre-fetched fundamentals data into a context string for the LLM."""
|
||||
parts = []
|
||||
|
||||
if data.get("fundamentals"):
|
||||
parts.append(f"## Company Fundamentals Overview\n{data['fundamentals']}")
|
||||
|
||||
if data.get("balance_sheet"):
|
||||
parts.append(f"## Balance Sheet\n{data['balance_sheet']}")
|
||||
|
||||
if data.get("cashflow"):
|
||||
parts.append(f"## Cash Flow Statement\n{data['cashflow']}")
|
||||
|
||||
if data.get("income_statement"):
|
||||
parts.append(f"## Income Statement\n{data['income_statement']}")
|
||||
|
||||
return "\n\n".join(parts)
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import requests
|
||||
import pandas as pd
|
||||
|
|
|
|||
Loading…
Reference in New Issue