{ "validation_summary": { "timestamp": "2025-07-31T11:12:51.870922", "total_validation_time": 1.3252480030059814, "total_tasks": 5, "successful_tasks": 2, "failed_tasks": 1, "tasks_with_errors": 2 }, "detailed_results": { "旧版本内容生成": { "status": "failed", "results": [], "error": "No module named 'requests'" }, "新版本内容生成": { "status": "error", "results": [], "error": "`regex` is removed. use `pattern` instead\n\nFor further information visit https://errors.pydantic.dev/2.11/u/removed-kwargs" }, "JSON处理功能": { "status": "completed", "test_cases": [ { "name": "正常JSON", "input": "{\"title\": \"测试\", \"content\": \"内容\"}", "output": { "title": "测试", "content": "内容" }, "success": true, "processing_time": 0.0001499652862548828, "timestamp": "2025-07-31T11:12:50.860885" }, { "name": "末尾多逗号", "input": "{\"title\": \"测试\", \"content\": \"内容\",}", "output": { "title": "测试", "content": "内容" }, "success": true, "processing_time": 7.295608520507812e-05, "timestamp": "2025-07-31T11:12:50.861050" }, { "name": "缺少逗号", "input": "{\"title\": \"测试\" \"content\": \"内容\"}", "output": { "title": "测试", "content": "内容" }, "success": true, "processing_time": 3.600120544433594e-05, "timestamp": "2025-07-31T11:12:50.861123" }, { "name": "缺少结尾括号", "input": "{\"title\": \"测试\", \"content\": \"内容\"", "output": { "title": "测试", "content": "内容" }, "success": true, "processing_time": 2.7894973754882812e-05, "timestamp": "2025-07-31T11:12:50.861181" }, { "name": "包含代码块", "input": "```json\n{\"title\": \"测试\", \"content\": \"内容\"}\n```", "output": { "title": "测试", "content": "内容" }, "success": true, "processing_time": 7.152557373046875e-06, "timestamp": "2025-07-31T11:12:50.861210" }, { "name": "复杂嵌套", "input": "{\"title\": \"测试\", \"details\": {\"location\": \"杭州\", \"duration\": 3}, \"tags\": [\"旅游\", \"休闲\",]}", "output": { "title": "测试", "details": { "location": "杭州", "duration": 3 }, "tags": [ "旅游", "休闲" ] }, "success": true, "processing_time": 5.6743621826171875e-05, "timestamp": "2025-07-31T11:12:50.861290" } ], "statistics": { "total_tests": 6, "successful_tests": 6, "success_rate": 1.0, "processor_stats": { "total_attempts": 6, "successful_extractions": 6, "repair_used": 4, "fallback_used": 0, "success_rate": 1.0, "repair_rate": 0.6666666666666666 } } }, "异步任务队列": { "status": "completed", "tasks": [ { "task_id": "9650f2a6-741f-4320-b7ab-6a4924f8ced2", "status": "completed", "result": { "processed_data": { "name": "内容生成测试", "type": "content" }, "result": "处理完成: 内容生成测试", "timestamp": "2025-07-31T11:12:50.966336" }, "error": null, "processing_time": 0.101227 }, { "task_id": "88bc20fb-0269-4a0e-9043-00f6aaf00fa9", "status": "completed", "result": { "processed_data": { "name": "海报生成测试", "type": "poster" }, "result": "处理完成: 海报生成测试", "timestamp": "2025-07-31T11:12:50.967220" }, "error": null, "processing_time": 0.101932 }, { "task_id": "98b3b66f-27fe-4f6b-8530-ff2640a4e46e", "status": "completed", "result": { "processed_data": { "name": "文档处理测试", "type": "document" }, "result": "处理完成: 文档处理测试", "timestamp": "2025-07-31T11:12:51.068297" }, "error": null, "processing_time": 0.101318 } ], "queue_statistics": { "total_tasks": 3, "pending": 0, "running": true, "completed": 3, "failed": 0, "queue_size": 0, "workers": 2 } }, "API接口对比": { "timestamp": "2025-07-31T11:12:51.867517", "old_api": { "api/routers/tweet.py": { "exists": true, "routes": [ { "method": "POST", "path": "/topics" }, { "method": "POST", "path": "/content" }, { "method": "POST", "path": "/content-with-prompt" }, { "method": "POST", "path": "/judge" }, { "method": "POST", "path": "/pipeline" } ], "file_size": 13122, "line_count": 393 }, "api/routers/poster.py": { "exists": true, "routes": [ { "method": "GET", "path": "/test/templates" }, { "method": "GET", "path": "/templates" }, { "method": "GET", "path": "/templates/{template_id}" }, { "method": "POST", "path": "/generate" }, { "method": "POST", "path": "/image-usage" } ], "file_size": 5325, "line_count": 166 }, "api/routers/document.py": { "exists": true, "routes": [ { "method": "POST", "path": "/process" }, { "method": "POST", "path": "/batch-process" }, { "method": "POST", "path": "/extract-text" }, { "method": "POST", "path": "/parse-text" }, { "method": "POST", "path": "/transform" }, { "method": "GET", "path": "/supported-formats" }, { "method": "GET", "path": "/statistics" }, { "method": "POST", "path": "/upload-and-process" }, { "method": "POST", "path": "/upload-batch-process" } ], "file_size": 11105, "line_count": 338 } }, "new_api": { "api_v2/routers/content.py": { "exists": true, "routes": [ { "method": "POST", "path": "/topics" }, { "method": "POST", "path": "/generate" }, { "method": "POST", "path": "/judge" }, { "method": "GET", "path": "/pipeline/stats" } ], "file_size": 6201, "line_count": 214 }, "api_v2/routers/poster.py": { "exists": true, "routes": [ { "method": "POST", "path": "/generate" }, { "method": "POST", "path": "/vibrant" }, { "method": "GET", "path": "/templates" }, { "method": "GET", "path": "/pipeline/stats" } ], "file_size": 6575, "line_count": 220 }, "api_v2/routers/document.py": { "exists": true, "routes": [ { "method": "POST", "path": "/process" }, { "method": "POST", "path": "/extract" }, { "method": "POST", "path": "/integrate" }, { "method": "POST", "path": "/transform" }, { "method": "GET", "path": "/formats" }, { "method": "GET", "path": "/pipeline/stats" } ], "file_size": 10237, "line_count": 329 }, "api_v2/routers/crawling.py": { "exists": true, "routes": [ { "method": "POST", "path": "/xhs/search" }, { "method": "POST", "path": "/xhs/batch_search" }, { "method": "POST", "path": "/keywords/analyze" }, { "method": "POST", "path": "/content/analyze" }, { "method": "POST", "path": "/search_and_analyze" }, { "method": "GET", "path": "/pipeline/stats" } ], "file_size": 12545, "line_count": 403 } }, "interface_mapping": { "content_generation": { "old": "api/routers/tweet.py", "new": "api_v2/routers/content.py", "mapping_quality": "high" }, "poster_generation": { "old": "api/routers/poster.py", "new": "api_v2/routers/poster.py", "mapping_quality": "high" }, "document_processing": { "old": "api/routers/document.py", "new": "api_v2/routers/document.py", "mapping_quality": "high" }, "crawling_analysis": { "old": null, "new": "api_v2/routers/crawling.py", "mapping_quality": "new_feature" } }, "compatibility_analysis": { "total_interfaces": 3, "compatible_interfaces": 3, "compatibility_rate": 1.0, "new_features": 1 } } }, "migration_recommendations": { "overall": "建议进行迁移", "ready_modules": [ "content_generation", "poster_generation", "document_processing" ] }, "optimization_suggestions": [ "JSON处理算法表现优秀,建议应用到所有模块", "异步任务队列功能正常,建议集成到API服务中" ] }