fix: 恢复 init_db.py 等全部缺失文件 + LLM 集成
This commit is contained in:
+2
-13
@@ -1116,20 +1116,10 @@ async def process_file_core(
|
||||
logger.info("FreeCAD验证已禁用(设置 ENABLE_FREECAD_VERIFICATION=true 启用)")
|
||||
verification_result = {"status": "disabled", "reason": "FreeCAD验证已禁用"}
|
||||
|
||||
# 9.8 LLM 增强分析(可选,不影响主流程)
|
||||
# 9.8 LLM 增强分析
|
||||
llm_report = None
|
||||
llm_parting = None
|
||||
if analysis_result:
|
||||
llm_report = await llm_service.generate_design_report(
|
||||
analysis_result, detailed_cavity_json
|
||||
)
|
||||
# 分型推荐:当前无候选方案时跳过
|
||||
candidate_schemes = detailed_cavity_json.get("candidate_schemes", [])
|
||||
if candidate_schemes:
|
||||
llm_parting = await llm_service.recommend_parting_direction(
|
||||
geometry_data, candidate_schemes, selected_material,
|
||||
cavity_count=cavity_count,
|
||||
)
|
||||
llm_report = await llm_service.generate_design_report(analysis_result, detailed_cavity_json)
|
||||
|
||||
# 10. 完成处理
|
||||
await storage_service.update_stp_file_status(db_session, stp_file_id, "completed")
|
||||
@@ -1146,7 +1136,6 @@ async def process_file_core(
|
||||
tasks[task_id]["html_file"] = f"/html/{Path(html_file_path).name}" # 只使用文件名
|
||||
tasks[task_id]["verification"] = verification_result # 添加验证结果
|
||||
tasks[task_id]["llm_report"] = llm_report
|
||||
tasks[task_id]["llm_parting_recommendation"] = llm_parting
|
||||
tasks[task_id]["status"] = ProcessingStatus.COMPLETED
|
||||
tasks[task_id]["completed_at"] = str(datetime.now())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user