docs: translate .env.example comments from Chinese to English
� Environment Configuration Localization: - Translate all Chinese comments to English - Maintain same configuration structure and values - Update project references from TradingAgents-CN to TradingAgents - Add enhanced usage instructions and quick start guide � Key Changes: - Header: TradingAgents Environment Variables Configuration Example - API Keys: Clear English descriptions for all providers - Database: English explanations for MongoDB and Redis configuration - Reddit API: English comments for social media integration - Usage Instructions: Comprehensive English setup guide � Enhanced Documentation: - Added Quick Start Guide section - Separate instructions for minimal vs full feature setup - Clear step-by-step configuration process - Docker commands for database setup - Dependency installation instructions Now .env.example provides clear English guidance for: - International users and developers - API key configuration and sources - Database setup (optional) - Quick start vs full feature deployment - Testing and validation steps This makes the project more accessible to global users while maintaining all functionality and configuration options.
This commit is contained in:
parent
08dd78b42a
commit
a7d68205af
101
.env.example
101
.env.example
|
|
@ -1,53 +1,53 @@
|
|||
# TradingAgents-CN 环境变量配置示例
|
||||
# 🔐 重要:复制此文件为 .env 并填入您的真实API密钥
|
||||
# ⚠️ 警告:.env文件包含敏感信息,请勿提交到Git仓库
|
||||
# TradingAgents Environment Variables Configuration Example
|
||||
# 🔐 Important: Copy this file to .env and fill in your real API keys
|
||||
# ⚠️ Warning: .env file contains sensitive information, do not commit to Git repository
|
||||
|
||||
# ===== 必需的API密钥 =====
|
||||
# ===== Required API Keys =====
|
||||
|
||||
# 🇨🇳 阿里百炼 API 密钥 (推荐,国产大模型,中文优化)
|
||||
# 获取地址: https://dashscope.aliyun.com/
|
||||
# 注册阿里云账号 -> 开通百炼服务 -> 获取API密钥
|
||||
# 格式: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
# 🇨🇳 DashScope (Alibaba Cloud) API Key (Recommended for Chinese users)
|
||||
# Get from: https://dashscope.aliyun.com/
|
||||
# Register Alibaba Cloud account -> Enable DashScope service -> Get API key
|
||||
# Format: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
DASHSCOPE_API_KEY=your_dashscope_api_key_here
|
||||
|
||||
# 📊 FinnHub API 密钥 (必需,用于获取金融数据)
|
||||
# 获取地址: https://finnhub.io/
|
||||
# 免费账户每分钟60次请求,足够日常使用
|
||||
# 格式: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
# 📊 FinnHub API Key (Required for financial data)
|
||||
# Get from: https://finnhub.io/
|
||||
# Free account allows 60 requests per minute, sufficient for daily use
|
||||
# Format: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
FINNHUB_API_KEY=your_finnhub_api_key_here
|
||||
|
||||
# ===== 可选的API密钥 =====
|
||||
# ===== Optional API Keys =====
|
||||
|
||||
# 🌍 OpenAI API 密钥 (可选,需要国外网络)
|
||||
# 获取地址: https://platform.openai.com/
|
||||
# 格式: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
# 🌍 OpenAI API Key (Optional, requires international network access)
|
||||
# Get from: https://platform.openai.com/
|
||||
# Format: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
OPENAI_API_KEY=your_openai_api_key_here
|
||||
|
||||
# 🔍 Google AI API 密钥 (可选,用于Gemini模型)
|
||||
# 获取地址: https://ai.google.dev/
|
||||
# 🔍 Google AI API Key (Optional, for Gemini models)
|
||||
# Get from: https://ai.google.dev/
|
||||
GOOGLE_API_KEY=your_google_api_key_here
|
||||
|
||||
# 🤖 Anthropic API 密钥 (可选,用于Claude模型)
|
||||
# 获取地址: https://console.anthropic.com/
|
||||
# 🤖 Anthropic API Key (Optional, for Claude models)
|
||||
# Get from: https://console.anthropic.com/
|
||||
ANTHROPIC_API_KEY=your_anthropic_api_key_here
|
||||
|
||||
# ===== 项目配置 =====
|
||||
# ===== Project Configuration =====
|
||||
|
||||
# 结果存储目录
|
||||
# Results storage directory
|
||||
TRADINGAGENTS_RESULTS_DIR=./results
|
||||
|
||||
# 日志级别 (DEBUG, INFO, WARNING, ERROR)
|
||||
# Log level (DEBUG, INFO, WARNING, ERROR)
|
||||
TRADINGAGENTS_LOG_LEVEL=INFO
|
||||
|
||||
# ===== 数据库配置 =====
|
||||
# ===== Database Configuration =====
|
||||
|
||||
# 🔧 数据库启用开关 (默认不启用,系统使用文件缓存)
|
||||
# 设置为 true 启用对应数据库,false 或不设置则禁用
|
||||
# 🔧 Database enable switches (Disabled by default, system uses file cache)
|
||||
# Set to true to enable corresponding database, false or unset to disable
|
||||
MONGODB_ENABLED=false
|
||||
REDIS_ENABLED=false
|
||||
|
||||
# 🗄️ MongoDB数据库配置 (用于持久化存储股票数据和分析结果)
|
||||
# 使用Docker启动: scripts/start_services_alt_ports.bat
|
||||
# 🗄️ MongoDB database configuration (For persistent storage of stock data and analysis results)
|
||||
# Start with Docker: scripts/start_services_alt_ports.bat
|
||||
MONGODB_HOST=localhost
|
||||
MONGODB_PORT=27018
|
||||
MONGODB_USERNAME=admin
|
||||
|
|
@ -55,29 +55,44 @@ MONGODB_PASSWORD=tradingagents123
|
|||
MONGODB_DATABASE=tradingagents
|
||||
MONGODB_AUTH_SOURCE=admin
|
||||
|
||||
# 📦 Redis缓存配置 (用于高速缓存和会话管理)
|
||||
# 使用Docker启动: scripts/start_services_alt_ports.bat
|
||||
# 📦 Redis cache configuration (For high-speed caching and session management)
|
||||
# Start with Docker: scripts/start_services_alt_ports.bat
|
||||
REDIS_HOST=localhost
|
||||
REDIS_PORT=6380
|
||||
REDIS_PASSWORD=tradingagents123
|
||||
REDIS_DB=0
|
||||
|
||||
# ===== Reddit API 配置 (可选) =====
|
||||
# 用于获取社交媒体情绪数据
|
||||
# 获取地址: https://www.reddit.com/prefs/apps
|
||||
# ===== Reddit API Configuration (Optional) =====
|
||||
# For social media sentiment data collection
|
||||
# Get from: https://www.reddit.com/prefs/apps
|
||||
|
||||
# Reddit 客户端ID
|
||||
# Reddit client ID
|
||||
REDDIT_CLIENT_ID=your_reddit_client_id
|
||||
|
||||
# Reddit 客户端密钥
|
||||
# Reddit client secret
|
||||
REDDIT_CLIENT_SECRET=your_reddit_client_secret
|
||||
|
||||
# Reddit 用户代理
|
||||
REDDIT_USER_AGENT=TradingAgents-CN/1.0
|
||||
# Reddit user agent
|
||||
REDDIT_USER_AGENT=TradingAgents/1.0
|
||||
|
||||
# ===== 使用说明 =====
|
||||
# 1. 复制此文件为 .env: cp .env.example .env
|
||||
# 2. 编辑 .env 文件,填入您的真实API密钥
|
||||
# 3. 至少需要配置 DASHSCOPE_API_KEY 和 FINNHUB_API_KEY
|
||||
# 4. 运行 python -m cli.main config 检查配置状态
|
||||
# 5. 运行 python -m cli.main test 验证配置是否正确
|
||||
# ===== Usage Instructions =====
|
||||
# 1. Copy this file to .env: cp .env.example .env
|
||||
# 2. Edit .env file and fill in your real API keys
|
||||
# 3. At minimum, configure DASHSCOPE_API_KEY and FINNHUB_API_KEY
|
||||
# 4. Run python -m cli.main to start the application
|
||||
# 5. Test your configuration by running a sample analysis
|
||||
|
||||
# ===== Quick Start Guide =====
|
||||
# For immediate use (minimal setup):
|
||||
# 1. Get DashScope API key from https://dashscope.aliyun.com/
|
||||
# 2. Get FinnHub API key from https://finnhub.io/
|
||||
# 3. Copy this file: cp .env.example .env
|
||||
# 4. Edit .env and set DASHSCOPE_API_KEY and FINNHUB_API_KEY
|
||||
# 5. Install dependencies: pip install pytdx beautifulsoup4
|
||||
# 6. Run: python -m cli.main
|
||||
|
||||
# For full features (with database caching):
|
||||
# 1. Start databases: docker run -d -p 27017:27017 --name mongodb mongo
|
||||
# 2. Start Redis: docker run -d -p 6379:6379 --name redis redis
|
||||
# 3. Set MONGODB_ENABLED=true and REDIS_ENABLED=true in .env
|
||||
# 4. Run: python -m cli.main
|
||||
|
|
|
|||
Loading…
Reference in New Issue