Remove the fucking troubleshooting override
Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user