Skip to content

Commit a99844b

Browse files
committed
Fix bug in config path resolution
1 parent 3ebbfea commit a99844b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/math_tutor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
class MathTutor:
1010
def __init__(self, config_path: str, env_path: str = '.env', model=None):
11+
self.config_path = config_path
1112
self.config = self._load_config(config_path)
1213
if model is not None:
1314
self.config['model_name'] = model
@@ -58,7 +59,7 @@ def process_input(self, submission: str, exemplary_solution: str, temperature: f
5859
if "workflow" in exemplary_solution_data:
5960
workflow_path = exemplary_solution_data["workflow"]
6061
# complete path to absolute path
61-
workflow_full_path = os.path.join(os.path.dirname(config_path), workflow_path)
62+
workflow_full_path = os.path.join(os.path.dirname(self.config_path), workflow_path)
6263
print(f"Loading workflow from: {workflow_path}")
6364
with open(workflow_path, 'r') as f:
6465
workflow_config = json.load(f)

0 commit comments

Comments
 (0)