This commit is contained in:
oficcejo
2026-02-27 12:08:00 +08:00
parent bce3b9645f
commit f3af15ddc8
25 changed files with 203 additions and 132 deletions
+4 -3
View File
@@ -11,19 +11,20 @@ from datetime import datetime
# 导入必要的模块
from portfolio_db import portfolio_db
import config
class PortfolioManager:
"""持仓管理器类"""
def __init__(self, model="deepseek-chat"):
def __init__(self, model=None):
"""
初始化持仓管理器
Args:
model: AI模型deepseek-chat 或 deepseek-reasoner
model: AI模型名称,默认从 .env 的 DEFAULT_MODEL_NAME 读取
"""
self.model = model
self.model = model or config.DEFAULT_MODEL_NAME
self.db = portfolio_db
# ==================== 持仓股票管理 ====================