Leonydis137 commited on
Commit
e924dfd
·
verified ·
1 Parent(s): 73fba09

Rename critic.py to app/critic.py

Browse files
Files changed (2) hide show
  1. app/critic.py +30 -0
  2. critic.py +0 -0
app/critic.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import random
2
+
3
+ class Critic:
4
+ def review(self, step, result):
5
+ reviews = {
6
+ "code": [
7
+ "Code executed successfully with no errors.",
8
+ "Code executed but produced unexpected output.",
9
+ "Code contains inefficiencies that could be optimized.",
10
+ "Excellent implementation following best practices."
11
+ ],
12
+ "search": [
13
+ "Relevant information found for the task.",
14
+ "Search results could be more targeted.",
15
+ "Comprehensive research completed successfully."
16
+ ],
17
+ "diagnose": [
18
+ "System health check completed with no issues found.",
19
+ "Minor optimizations identified for system performance.",
20
+ "Critical improvements needed in error handling."
21
+ ]
22
+ }
23
+
24
+ if "code" in step.lower() or "develop" in step.lower():
25
+ return random.choice(reviews["code"])
26
+ elif "research" in step.lower() or "search" in step.lower():
27
+ return random.choice(reviews["search"])
28
+ elif "diagnose" in step.lower() or "check" in step.lower():
29
+ return random.choice(reviews["diagnose"])
30
+ return "Step completed adequately."
critic.py DELETED
File without changes