Commit Graph

23 Commits

Author SHA1 Message Date
liuping 1bbe898812 feat: integrate database cache into CLI startup logic
� Cache Integration Enhancements:
- Modify get_cache() to use IntegratedCacheManager by default
- Automatic fallback from database cache to file cache
- Intelligent cache selection based on configuration

� Integration Features:
- IntegratedCacheManager now used in CLI startup
- Supports both database and file-based caching
- Automatic detection of database availability
- Graceful degradation when databases unavailable

 Test Results:
- Cache selection logic:  Pass
- Cache functionality:  Pass
- Database cache available but disabled by default
- File cache working as fallback

� User Experience:
- Default: File-based cache (fast, no setup required)
- Optional: Database cache (enable with MONGODB_ENABLED=true)
- Seamless transition between cache types
- No breaking changes to existing functionality

� Current Status:
- Cache Type: IntegratedCacheManager
- Adaptive Cache: Disabled (databases disabled in .env)
- MongoDB: Disabled by default
- Redis: Disabled by default
- Fallback: Traditional file cache working perfectly

Now users get database cache benefits when enabled,
with automatic fallback to reliable file cache.
2025-07-06 01:52:50 +08:00
liuping 8acf6feec0 fix: resolve DashScope embedding 404 error and add CLI model options
� Fixed Issues:
- Resolve 404 error when using DashScope LLM with OpenAI embeddings
- Add missing DashScope model options in CLI selection
- Improve embedding provider fallback logic

� Memory System Updates:
- Add DashScope embedding support (text-embedding-v3)
- Implement intelligent fallback: DashScope → OpenAI → Error
- Add proper API key validation and error messages
- Support multiple embedding providers based on LLM selection

� CLI Enhancements:
- Add DashScope models to SHALLOW_AGENT_OPTIONS and DEEP_AGENT_OPTIONS
- Support qwen-turbo, qwen-plus, qwen-max, qwen-max-longcontext
- Fix KeyError when selecting DashScope as LLM provider

 Test Results:
- All .env configuration tests pass
- DashScope embeddings working correctly
- Proper fallback to OpenAI when DashScope unavailable
- Memory initialization successful with real API keys

� Now users can successfully:
1. Select DashScope in CLI without errors
2. Use DashScope embeddings for memory system
3. Automatic fallback if DashScope unavailable
4. Complete end-to-end DashScope workflow
2025-07-06 01:43:13 +08:00
liuping eba4e1f7ec fix: improve DashScope integration and fix import paths
- Fix DashScope adapter import path in trading_graph.py
- Improve error handling for DashScope initialization
- Add comprehensive DashScope integration testing
- Verify all DashScope components work correctly

Integration test results:
 DashScope adapter import successful
 TradingAgentsGraph import with DashScope support
 CLI utils include DashScope option (first choice)
 DashScope configuration creation
 DashScope LLM instances creation

DashScope is now fully integrated and ready for use:
- Available in CLI as 'DashScope (Alibaba Cloud)'
- Supports qwen-turbo, qwen-plus, qwen-max models
- Proper error handling for missing API keys
- Complete documentation and examples
2025-07-06 01:20:25 +08:00
liuping cdba5bf780 feat: add DashScope (Alibaba Cloud) LLM provider support
- Add DashScope to CLI LLM provider selection (first option)
- Add DashScope support in TradingAgentsGraph with proper error handling
- Import ChatDashScope adapter with fallback for missing dependencies
- Update default_config.py with DashScope configuration comments
- Create comprehensive DashScope configuration example

Features added:
- DashScope provider selection in CLI (cli/utils.py)
- LLM initialization for DashScope models (trading_graph.py)
- Configuration validation and testing (examples/dashscope_config_example.py)
- Support for qwen-turbo, qwen-plus, qwen-max models
- Proper error handling for missing dashscope package

Usage:
1. Install: pip install dashscope
2. Configure: DASHSCOPE_API_KEY in .env file
3. Select 'DashScope (Alibaba Cloud)' in CLI
4. Use models: qwen-turbo (fast), qwen-plus (balanced), qwen-max (best)

This enables Chinese users to use Alibaba Cloud's Qwen models
for financial analysis with optimized Chinese language support.
2025-07-06 01:15:35 +08:00
liuping 1f292d5ab1 feat: merge requirements.txt and add optional dependencies
- Add 5 new dependencies from Chinese version:
  * dashscope - Alibaba Cloud LLM support
  * streamlit - Web app framework
  * plotly - Interactive plotting
  * pytdx - TongDaXin API for Chinese stock data
  * pymongo - MongoDB database support

- Create requirements-optional.txt for optional dependencies
- Update pyproject.toml with optional dependency groups:
  * chinese: pytdx, dashscope
  * database: pymongo
  * visualization: streamlit, plotly
  * development: pytest, black, flake8
  * all: includes all optional dependencies

Installation options:
- Basic: pip install -r requirements.txt
- With Chinese support: pip install .[chinese]
- With all features: pip install .[all]
2025-07-06 00:50:20 +08:00
liuping 0de847601e feat: merge Chinese version features
- Add 18 new feature files from Chinese version
- Support for Chinese market data (A-shares)
- Database integration with MongoDB
- Advanced caching system with adaptive strategies
- LLM adapters for DashScope and other providers
- API services and real-time data utilities
- Enhanced configuration management
- Comprehensive English documentation

New features:
- Chinese finance data aggregation
- TDX (TongDaXin) API integration
- Optimized China stock data provider
- Adaptive and integrated caching
- Database cache management
- Stock data services
- Real-time news utilities

Breaking changes: None (all new features are additive)
Dependencies: Added pymongo, beautifulsoup4, dashscope (optional)

For detailed information, see MERGE_SUMMARY.md
2025-07-06 00:26:49 +08:00
mirza-samad-ahmed-baig f704828f89 Fix: Prevent infinite loops, enable reflection, and improve logging 2025-07-03 17:43:40 +05:00
Yijia Xiao 718df34932
Merge pull request #29 from ZeroAct/save_results
Save results
2025-06-26 00:28:30 -04:00
Max Wong 43aa9c5d09
Local Ollama (#53)
- Fix typo 'Start' 'End'
- Add llama3.1 selection
- Use 'quick_think_llm' model instead of hard-coding GPT
2025-06-26 00:27:01 -04:00
Yijia Xiao 26c5ba5a78
Revert "Docker support and Ollama support (#47)" (#57)
This reverts commit 78ea029a0b.
2025-06-26 00:07:58 -04:00
Geeta Chauhan 78ea029a0b
Docker support and Ollama support (#47)
- Added support for running CLI and Ollama server via Docker
- Introduced tests for local embeddings model and standalone Docker setup
- Enabled conditional Ollama server launch via LLM_PROVIDER
2025-06-25 23:57:05 -04:00
Huijae Lee ee3d499894
Merge branch 'TauricResearch:main' into save_results 2025-06-25 08:43:19 +09:00
Yijia Xiao b575bd0941
Merge pull request #52 from TauricResearch/dev
Merge dev into main. Add support for Anthropic and OpenRouter.
2025-06-23 20:38:14 -04:00
Edward Sun 52284ce13c fixed anthropic support. Anthropic has different format of response when it has tool calls. Explicit handling added 2025-06-21 12:51:34 -07:00
Yijia Xiao c2f897fc67
Merge pull request #43 from AtharvSabde/patch-1
fundamentals_analyst.py (spelling mistake in instruction: Makrdown -> Markdown)
2025-06-19 15:05:08 -04:00
Atharv Sabde 2af7ef3d79
fundamentals_analyst.py(spelling mistake.markdown) 2025-06-19 21:48:16 +05:30
Edward Sun 7eaf4d995f update clear msg bc anthropic needs at least 1 msg in chat call 2025-06-15 23:14:47 -07:00
Edward Sun da84ef43aa main works, cli bugs 2025-06-15 22:20:59 -07:00
Edward Sun 90b23e72f5
Merge pull request #25 from maxer137/main
Add support for other backends, such as OpenRouter and Ollama
2025-06-15 16:06:20 -07:00
saksham0161 570644d939
Fix ticker hardcoding in prompt (#28) 2025-06-11 19:43:39 -07:00
ZeroAct 9647359246 save reports & logs under results_dir 2025-06-12 11:25:07 +09:00
maxer137 99789f9cd1 Add support for other backends, such as OpenRouter and olama
This aims to offer alternative OpenAI capable api's.
This offers people to experiment with running the application locally
2025-06-11 14:19:25 +02:00
Yijia-Xiao cc97cb6d5d chore(release): v0.1.0 – initial public release of TradingAgents 2025-06-05 04:27:57 -07:00