- Introduced a new `/analyze` endpoint in the analyst API to process analysis requests, allowing users to receive textual interpretations and chart specifications based on provided prompts. - Enhanced `analyst_schemas.py` with `AnalyzeRequest` and `ChartSpec` models to structure analysis requests and validate chart specifications. - Implemented chart validation logic in a new `analyst_chart.py` service, ensuring that chart types and fields are correctly specified and conform to allowed values. - Updated `AnalystAgent` to handle analysis requests, integrating the new logic for generating responses based on user prompts and data availability. - Added unit tests to verify the functionality of the new endpoint and validation mechanisms, ensuring robustness and reliability. This update significantly enhances the analytical capabilities of the application, providing users with improved tools for data interpretation and visualization.
Core 模拟库 · 初始化
库名
jinrong_core· 与jinrong_agent同 MySQL 实例 · Agent 只读
一键重置(Windows)
.\scripts\core\reset.ps1
手动顺序
mysql -u root -p < scripts/core/00-create-database.sql
mysql -u root -p < scripts/core/01-ddl.sql
mysql -u root -p < scripts/core/02-seed-base.sql
mysql -u root -p < scripts/core/03-seed-customers.sql
mysql -u root -p < scripts/core/04-seed-holdings.sql
mysql -u root -p < scripts/core/05-seed-trades.sql
mysql -u root -p < scripts/core/08-seed-trades-timeline.sql
mysql -u root -p < scripts/core/06-seed-nav.sql
mysql -u root -p < scripts/core/07-seed-nav-history.sql
# Agent 库(若未建)
mysql -u root -p < docs/项目框架设计/表设计/01-mysql-共用底座.sql
python scripts/sync/sync_advisor_rel.py
python scripts/sync/sync_neo4j.py
种子规模(当前)
| 类型 | 数量 |
|---|---|
| 客户 | 28 + 5 手册示范(CUST-DEMO-A~E) |
| 理财代理人 | 5 |
| 分析/风控/合规/运营 | 2+2+2+1(风控另有演示账号 STAFF-90001,我方分支独有) |
| 双角色 staff | 1(STAFF-10091 advisor+compliance) |
| 产品 | 14 |
| 净值历史 | 14 产品 × 365 日(06 锚定日 + 07;日涨跌与模拟 CSI300 同向 + 产品 beta,再生 seed_nav_history.py --export-sql) |
| 持仓记录 | ~45(单快照 as_of=2026-09-04;客户间规模差异大,见 04-seed-holdings.sql) |
| 交易 | 05 风控/AML 样例 + 08 跨月时间线 ~53 笔(seed_trade_timeline.py --export-sql) |
| C×R 适当性矩阵 | 25 行(core_suitability_rule,L0 权威) |