fruitpicker01 commited on
Commit
2c46315
1 Parent(s): 5cce71c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -1478,14 +1478,20 @@ def perform_checks(message, description, key_message):
1478
 
1479
  # Perform LLM checks group 1
1480
  for check_name, check_func in llm_checks_group1:
1481
- result = safe_check(check_func, message, description, key_message)
 
 
 
 
 
1482
  checks[check_name] = result
1483
  if result is False:
1484
- return checks # Stop on first failure
 
1485
 
1486
  # Perform remaining LLM checks
1487
  for check_name, check_func in llm_checks_group2:
1488
- result = safe_check(check_func, message, description, key_message)
1489
  checks[check_name] = result
1490
  if result is False:
1491
  return checks # Stop on first failure
 
1478
 
1479
  # Perform LLM checks group 1
1480
  for check_name, check_func in llm_checks_group1:
1481
+ if check_name == "no_contradictions":
1482
+ result = safe_check(check_func, message, description)
1483
+ elif check_name == "contains_key_message":
1484
+ result = safe_check(check_func, message, key_message)
1485
+ else:
1486
+ result = safe_check(check_func, message)
1487
  checks[check_name] = result
1488
  if result is False:
1489
+ return checks
1490
+
1491
 
1492
  # Perform remaining LLM checks
1493
  for check_name, check_func in llm_checks_group2:
1494
+ result = safe_check(check_func, message)
1495
  checks[check_name] = result
1496
  if result is False:
1497
  return checks # Stop on first failure