feat: add env variables loading support and example

This commit is contained in:
maxshhao 2025-07-05 01:16:36 +08:00
parent a438acdbbd
commit 3046f3dead
No known key found for this signature in database
3 changed files with 7 additions and 0 deletions

3
.env.example Normal file
View File

@ -0,0 +1,3 @@
OPENAI_API_KEY=sk-123
FINNHUB_API_KEY=
GOOGLE_API_KEY=

View File

@ -1,5 +1,8 @@
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
from dotenv import load_dotenv
load_dotenv()
# Create a custom config
config = DEFAULT_CONFIG.copy()

View File

@ -24,3 +24,4 @@ rich
questionary
langchain_anthropic
langchain-google-genai
python-dotenv