This commit is contained in:
Max Hao 2025-07-05 01:20:40 +08:00 committed by GitHub
commit 2e7806b263
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 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

@ -124,6 +124,11 @@ You will need the OpenAI API for all the agents.
export OPENAI_API_KEY=$YOUR_OPENAI_API_KEY
```
To help consolidate the variables in an .env file, you can copy the .env.example. The main.py script will pick up from there.
```bash
cp .env.example .env
```
### CLI Usage
You can also try out the CLI directly by running:

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