feat:修复投顾agent功能

This commit is contained in:
2026-09-15 09:24:30 +08:00
parent b75ab5ecdc
commit 9660323ff2
7 changed files with 150 additions and 30 deletions
+3 -1
View File
@@ -56,7 +56,9 @@ def enrich_customer_rows(
def _is_current_holdings_query(question: str) -> bool:
text = "".join((question or "").split())
return any(term in text for term in ("当前持仓", "目前持仓", "现有持仓", "持仓明细", "持仓情况"))
if any(term in text for term in ("当前持仓", "目前持仓", "现有持仓", "持仓明细", "持仓情况")):
return True
return "持仓" in text and not any(term in text for term in ("历史", "曾经", "已卖出", "交易记录"))
async def _query_current_holdings(