feat(analyst): Add analyze endpoint and chart specification validation
- 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.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
USE jinrong_core;
|
||||
|
||||
-- 最新净值 nav_date = 2026-09-04
|
||||
-- 最新净值 nav_date = 2026-09-04(daily_chg_pct 与 07 锚定日一致 · seed_nav_history.py --print-06)
|
||||
INSERT INTO core_product_nav (product_id, nav, daily_chg_pct, nav_date) VALUES
|
||||
('PROD-110022', 1.0300, 0.1500, '2026-09-04'),
|
||||
('PROD-110023', 1.0200, 0.1000, '2026-09-04'),
|
||||
('PROD-005827', 0.9500, -0.8000, '2026-09-04'),
|
||||
('PROD-005828', 1.0200, 0.2000, '2026-09-04'),
|
||||
('PROD-161725', 1.0500, 1.2000, '2026-09-04'),
|
||||
('PROD-161726', 1.0500, 0.9000, '2026-09-04'),
|
||||
('PROD-003095', 0.9500, -1.1000, '2026-09-04'),
|
||||
('PROD-510300', 1.0300, 0.3500, '2026-09-04'),
|
||||
('PROD-510500', 0.9800, -0.5000, '2026-09-04'),
|
||||
('PROD-XYZ999', 0.9000, -2.0000, '2026-09-04'),
|
||||
('PROD-000001', 1.0020, 0.0100, '2026-09-04'),
|
||||
('PROD-000002', 1.0050, 0.0200, '2026-09-04'),
|
||||
('PROD-WMG001', 1.0150, 0.0500, '2026-09-04'),
|
||||
('PROD-PRIV01', 1.0800, 0.3000, '2026-09-04');
|
||||
('PROD-110022', 1.0300, 0.0291, '2026-09-04'),
|
||||
('PROD-110023', 1.0200, 0.0000, '2026-09-04'),
|
||||
('PROD-005827', 0.9500, 0.0632, '2026-09-04'),
|
||||
('PROD-005828', 1.0200, -0.0588, '2026-09-04'),
|
||||
('PROD-161725', 1.0500, 0.0762, '2026-09-04'),
|
||||
('PROD-161726', 1.0500, 0.0858, '2026-09-04'),
|
||||
('PROD-003095', 0.9500, -0.0736, '2026-09-04'),
|
||||
('PROD-510300', 1.0300, 0.1069, '2026-09-04'),
|
||||
('PROD-510500', 0.9800, 0.0204, '2026-09-04'),
|
||||
('PROD-XYZ999', 0.9000, 0.0890, '2026-09-04'),
|
||||
('PROD-000001', 1.0020, -0.1296, '2026-09-04'),
|
||||
('PROD-000002', 1.0050, 0.0896, '2026-09-04'),
|
||||
('PROD-WMG001', 1.0150, 0.0789, '2026-09-04'),
|
||||
('PROD-PRIV01', 1.0800, 0.0741, '2026-09-04');
|
||||
|
||||
Reference in New Issue
Block a user