Compare commits

...

2 Commits

Author SHA1 Message Date
Leo91314 ae8baff942
Merge eb88674c1d into 59d6b2152d 2026-04-13 12:14:55 +05:30
Yijia-Xiao 59d6b2152d
fix: use ~/.tradingagents/ for cache and logs, resolving Docker permission issue (#519) 2026-04-13 05:26:04 +00:00
3 changed files with 9 additions and 11 deletions

View File

@ -4,7 +4,7 @@ services:
env_file:
- .env
volumes:
- ./results:/home/appuser/app/results
- tradingagents_data:/home/appuser/.tradingagents
tty: true
stdin_open: true
@ -22,7 +22,7 @@ services:
environment:
- LLM_PROVIDER=ollama
volumes:
- ./results:/home/appuser/app/results
- tradingagents_data:/home/appuser/.tradingagents
depends_on:
- ollama
tty: true
@ -31,4 +31,5 @@ services:
- ollama
volumes:
tradingagents_data:
ollama_data:

View File

@ -1,12 +1,11 @@
import os
_TRADINGAGENTS_HOME = os.path.join(os.path.expanduser("~"), ".tradingagents")
DEFAULT_CONFIG = {
"project_dir": os.path.abspath(os.path.join(os.path.dirname(__file__), ".")),
"results_dir": os.getenv("TRADINGAGENTS_RESULTS_DIR", "./results"),
"data_cache_dir": os.path.join(
os.path.abspath(os.path.join(os.path.dirname(__file__), ".")),
"dataflows/data_cache",
),
"results_dir": os.getenv("TRADINGAGENTS_RESULTS_DIR", os.path.join(_TRADINGAGENTS_HOME, "logs")),
"data_cache_dir": os.getenv("TRADINGAGENTS_CACHE_DIR", os.path.join(_TRADINGAGENTS_HOME, "cache")),
# LLM settings
"llm_provider": "openai", # openai, google, anthropic, xai, deepseek, kimi, openrouter, ollama
"deep_think_llm": "gpt-5.4",

View File

@ -66,10 +66,8 @@ class TradingAgentsGraph:
set_config(self.config)
# Create necessary directories
os.makedirs(
os.path.join(self.config["project_dir"], "dataflows/data_cache"),
exist_ok=True,
)
os.makedirs(self.config["data_cache_dir"], exist_ok=True)
os.makedirs(self.config["results_dir"], exist_ok=True)
# Initialize LLMs with provider-specific thinking configuration
llm_kwargs = self._get_provider_kwargs()