- 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.
8 lines
1.5 KiB
JSON
8 lines
1.5 KiB
JSON
{"case_id":"VISITOR-ROUTE-001","kind":"visitor_route","agent":"visitor","layer":"l0","message":"请转人工客服","expected":{"intent":"transfer_human","transfer_to_human":true}}
|
|
{"case_id":"VISITOR-ROUTE-002","kind":"visitor_route","agent":"visitor","layer":"l0","message":"我想投诉这个服务,也想知道哪个产品好","expected":{"intent":"transfer_human","transfer_to_human":true}}
|
|
{"case_id":"VISITOR-ROUTE-003","kind":"visitor_route","agent":"visitor","layer":"l0","message":"请推荐一个稳赚的产品","expected":{"intent":"reject","transfer_to_human":false,"reply_contains":"无法提供投资建议"}}
|
|
{"case_id":"VISITOR-ROUTE-004","kind":"visitor_route","agent":"visitor","layer":"l0","message":"我的持仓和余额是多少","expected":{"intent":"reject","transfer_to_human":false,"reply_contains":"游客模式下无法查询个人账户信息"}}
|
|
{"case_id":"VISITOR-ROUTE-005","kind":"visitor_route","agent":"visitor","layer":"l0","message":"明天行情会涨吗","expected":{"intent":"reject","transfer_to_human":false,"reply_contains":"无法预测市场走势"}}
|
|
{"case_id":"VISITOR-ROUTE-006","kind":"visitor_route","agent":"visitor","layer":"l0","message":"现在价格是多少","expected":{"intent":"reject","transfer_to_human":false,"reply_contains":"不支持实时行情查询"}}
|
|
{"case_id":"VISITOR-ROUTE-007","kind":"visitor_route","agent":"visitor","layer":"l0","message":"开户需要什么资料","expected":{"intent":"faq","transfer_to_human":false}}
|