Files
crypto_monitor/manual_trading_hub/hub_ai/config.py
T
dekun 77c7bbbb13 feat: add hub fund overview tab with 180-day equity curves
Add /funds page for total and per-account balance (funding+trading), drawdown, and daily snapshots from monitor board aggregation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-10 16:50:47 +08:00

38 lines
918 B
Python

"""中控 AI 配置(读 hub .env,与实例同名 AI 变量)。"""
from __future__ import annotations
import os
HUB_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SUMMARY_TEMPERATURE = 0.15
CHAT_TEMPERATURE = 0.5
CHAT_MAX_HISTORY_TURNS = 20
SUMMARY_RETENTION_DAYS = 90
CHAT_SESSION_RETENTION_DAYS = 60
FUND_HISTORY_DAYS = 180
CHAT_MAX_ATTACHMENTS = 3
CHAT_MAX_IMAGE_BYTES = 4 * 1024 * 1024
CHAT_MAX_TEXT_FILE_BYTES = 200 * 1024
def trading_day_reset_hour() -> int:
try:
return int(os.getenv("TRADING_DAY_RESET_HOUR", "8") or "8")
except ValueError:
return 8
def hub_flask_timeout() -> float:
try:
return float(os.getenv("HUB_FLASK_TIMEOUT", "10") or "10")
except ValueError:
return 10.0
def hub_agent_timeout() -> float:
try:
return float(os.getenv("HUB_AGENT_TIMEOUT", "8") or "8")
except ValueError:
return 8.0