diff --git a/app/routers/classify_email.py b/app/routers/classify_email.py index 83b045d..1f2851e 100644 --- a/app/routers/classify_email.py +++ b/app/routers/classify_email.py @@ -25,13 +25,12 @@ async def classify_route(request: ClassifyRequest): attempts = 0 valid_response = False response_data = {} - response = await send_classify_request(clean_email) + # return await send_classify_request(clean_email) while attempts < max_retries: # 1. Get the raw string response raw_response = await send_classify_request(clean_email) - try: if raw_response is None: print("Error: Received no response from classifier.") @@ -40,7 +39,7 @@ async def classify_route(request: ClassifyRequest): data = json.loads(raw_response) needs_action = data.get("needs_action") - task_description = False # data.get("task_description") + task_description = data.get("task_description") # 3. Check your "re-do" condition # Logic: If it needs action but the description is missing/empty, we retry.