Upload 3 files
Browse files- PlanFileEditAtomicFlow.py +5 -6
- PlanFileEditAtomicFlow.yaml +1 -1
PlanFileEditAtomicFlow.py
CHANGED
|
@@ -14,10 +14,10 @@ class PlanFileEditAtomicFlow(AtomicFlow):
|
|
| 14 |
"# Please do provide your feedback in the thoughts section so that JARVIS knows what you "
|
| 15 |
"are doing.\n"
|
| 16 |
"###########\n"
|
| 17 |
-
"
|
| 18 |
plan_str +
|
| 19 |
"\n############\n"
|
| 20 |
-
"
|
| 21 |
)
|
| 22 |
return content
|
| 23 |
|
|
@@ -39,15 +39,14 @@ class PlanFileEditAtomicFlow(AtomicFlow):
|
|
| 39 |
|
| 40 |
def _check_input(self, input_data: Dict[str, Any]):
|
| 41 |
assert "plan" in input_data, "plan is not passed to PlanFileEditAtomicFlow"
|
| 42 |
-
assert "
|
| 43 |
-
|
| 44 |
-
plan_file_loc = input_data["memory_files"]["plan"]
|
| 45 |
assert os.path.exists(plan_file_loc), f"{plan_file_loc} does not exist"
|
| 46 |
assert os.path.isfile(plan_file_loc), f"{plan_file_loc} is not a file"
|
| 47 |
|
| 48 |
def _generate_input_to_writer(self, input_data: Dict[str, Any]):
|
| 49 |
plan_str = input_data['plan']
|
| 50 |
-
plan_file_location = input_data["
|
| 51 |
content_to_write = self._generate_content(plan_file_location, plan_str)
|
| 52 |
file_location_to_write = self._generate_temp_file_location(plan_file_location)
|
| 53 |
return content_to_write, file_location_to_write
|
|
|
|
| 14 |
"# Please do provide your feedback in the thoughts section so that JARVIS knows what you "
|
| 15 |
"are doing.\n"
|
| 16 |
"###########\n"
|
| 17 |
+
"Plan:\n" +
|
| 18 |
plan_str +
|
| 19 |
"\n############\n"
|
| 20 |
+
"Thoughts:"
|
| 21 |
)
|
| 22 |
return content
|
| 23 |
|
|
|
|
| 39 |
|
| 40 |
def _check_input(self, input_data: Dict[str, Any]):
|
| 41 |
assert "plan" in input_data, "plan is not passed to PlanFileEditAtomicFlow"
|
| 42 |
+
assert "plan_file_location" in input_data, "plan_file_location not passed to PlanFileEditAtomicFlow"
|
| 43 |
+
plan_file_loc = input_data["plan_file_location"]
|
|
|
|
| 44 |
assert os.path.exists(plan_file_loc), f"{plan_file_loc} does not exist"
|
| 45 |
assert os.path.isfile(plan_file_loc), f"{plan_file_loc} is not a file"
|
| 46 |
|
| 47 |
def _generate_input_to_writer(self, input_data: Dict[str, Any]):
|
| 48 |
plan_str = input_data['plan']
|
| 49 |
+
plan_file_location = input_data["plan_file_location"]
|
| 50 |
content_to_write = self._generate_content(plan_file_location, plan_str)
|
| 51 |
file_location_to_write = self._generate_temp_file_location(plan_file_location)
|
| 52 |
return content_to_write, file_location_to_write
|
PlanFileEditAtomicFlow.yaml
CHANGED
|
@@ -3,7 +3,7 @@ description: "A flow that writes plan to a temp file"
|
|
| 3 |
|
| 4 |
input_interface:
|
| 5 |
- "plan"
|
| 6 |
-
- "
|
| 7 |
|
| 8 |
output_interface:
|
| 9 |
- "plan_editor_output"
|
|
|
|
| 3 |
|
| 4 |
input_interface:
|
| 5 |
- "plan"
|
| 6 |
+
- "plan_file_location"
|
| 7 |
|
| 8 |
output_interface:
|
| 9 |
- "plan_editor_output"
|