Fix some issues
Browse files
backend/__pycache__/solver.cpython-313.pyc
CHANGED
Binary files a/backend/__pycache__/solver.cpython-313.pyc and b/backend/__pycache__/solver.cpython-313.pyc differ
|
|
backend/solver.py
CHANGED
@@ -27,6 +27,7 @@ def solve_puzzle(index, puzzle, expected_solution, sys_content, sat_cnt_content)
|
|
27 |
current_solution = None
|
28 |
|
29 |
while attempts < 3:
|
|
|
30 |
attempts += 1
|
31 |
response = client.chat.completions.create(
|
32 |
model="gemini-2.0-flash",
|
@@ -148,7 +149,7 @@ def solve_puzzle(index, puzzle, expected_solution, sys_content, sat_cnt_content)
|
|
148 |
cnt_cons += 1
|
149 |
output = satisfied(constraint)
|
150 |
if "error" in output:
|
151 |
-
problematic_constraints += f"
|
152 |
ok_satisfied = False
|
153 |
break
|
154 |
if output == "unsat":
|
|
|
27 |
current_solution = None
|
28 |
|
29 |
while attempts < 3:
|
30 |
+
messages.append({"role": "user", "content": "Make sure you stick to the given categories with strictly identical names otherwise there will be a critical error."})
|
31 |
attempts += 1
|
32 |
response = client.chat.completions.create(
|
33 |
model="gemini-2.0-flash",
|
|
|
149 |
cnt_cons += 1
|
150 |
output = satisfied(constraint)
|
151 |
if "error" in output:
|
152 |
+
problematic_constraints += f"Error when checking {cnt_cons}-th constraint: {output}.\n"
|
153 |
ok_satisfied = False
|
154 |
break
|
155 |
if output == "unsat":
|