rairo commited on
Commit
873d1f1
·
verified ·
1 Parent(s): 192d9d2

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -882,8 +882,8 @@ def approve_project_plan(project_id):
882
  logger.info(f"[PROJECT APPROVAL] Response preview: {combined_text[:300]}...")
883
 
884
  # More robust regex patterns with error handling - updated for your production format
885
- tools_match = re.search(r"TOOLS AND MATERIALS:\s*(.*?)\s*(?=STEPS\(|STEPS:|$)", combined_text, re.DOTALL | re.IGNORECASE)
886
- steps_match = re.search(r"STEPS\([^)]*\):\s*(.*)|STEPS:\s*(.*)", combined_text, re.DOTALL | re.IGNORECASE)
887
 
888
  if not tools_match:
889
  logger.error(f"[PROJECT APPROVAL] ERROR: Could not find TOOLS AND MATERIALS section in AI response")
 
882
  logger.info(f"[PROJECT APPROVAL] Response preview: {combined_text[:300]}...")
883
 
884
  # More robust regex patterns with error handling - updated for your production format
885
+ tools_match = re.search(r"TOOLS AND MATERIALS:\s*(.*?)\s*(?=STEPS\s*\(|STEPS\s*:|$)", combined_text, re.DOTALL | re.IGNORECASE)
886
+ steps_match = re.search(r"STEPS\s*\([^)]*\):\s*(.*)|STEPS\s*:\s*(.*)", combined_text, re.DOTALL | re.IGNORECASE)
887
 
888
  if not tools_match:
889
  logger.error(f"[PROJECT APPROVAL] ERROR: Could not find TOOLS AND MATERIALS section in AI response")