Update WriteCodeFlow.yaml
Browse files- WriteCodeFlow.yaml +41 -42
WriteCodeFlow.yaml
CHANGED
|
@@ -1,45 +1,44 @@
|
|
| 1 |
name: "WriteCode"
|
| 2 |
description: "Given goal and code library location, generate code to achieve the goal and write the code to the file"
|
| 3 |
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
reset: false
|
|
|
|
| 1 |
name: "WriteCode"
|
| 2 |
description: "Given goal and code library location, generate code to achieve the goal and write the code to the file"
|
| 3 |
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
input_interface:
|
| 7 |
+
- "goal"
|
| 8 |
+
- "file_location"
|
| 9 |
+
|
| 10 |
+
output_interface:
|
| 11 |
+
- "code_writer_output"
|
| 12 |
+
|
| 13 |
+
subflows_config:
|
| 14 |
+
CodeGenerator:
|
| 15 |
+
_target_: Tachi67.WriteCodeFlowModule.CodeGeneratorAtomicFlow.instantiate_from_default_config
|
| 16 |
+
backend:
|
| 17 |
+
api_infos: ???
|
| 18 |
+
model_name:
|
| 19 |
+
openai: gpt-4
|
| 20 |
+
azure: azure/gpt-4
|
| 21 |
+
|
| 22 |
+
CodeFileEditor:
|
| 23 |
+
_target_: Tachi67.WriteCodeFlowModule.CodeFileEditorAtomicFlow.instantiate_from_default_config
|
| 24 |
+
|
| 25 |
+
early_exit_key: "EARLY_EXIT"
|
| 26 |
+
|
| 27 |
+
topology:
|
| 28 |
+
- goal: "Generate code to achieve the task."
|
| 29 |
+
input_interface:
|
| 30 |
+
_target_: flows.interfaces.KeyInterface
|
| 31 |
+
additional_transformations:
|
| 32 |
+
- _target_: flows.data_transformations.KeyMatchInput
|
| 33 |
+
flow: CodeGenerator
|
| 34 |
+
reset: false
|
| 35 |
+
|
| 36 |
+
- goal: "Write the code to the specified file location"
|
| 37 |
+
input_interface:
|
| 38 |
+
_target_: flows.interfaces.KeyInterface
|
| 39 |
+
keys_to_select: ["file_location", "code", "language_of_code"]
|
| 40 |
+
flow: CodeFileEditor
|
| 41 |
+
output_interface:
|
| 42 |
+
_target_: flows.interfaces.KeyInterface
|
| 43 |
+
keys_to_select: ["code_writer_output"]
|
| 44 |
+
reset: false
|
|
|