File size: 1,222 Bytes
e11f27d 0fe7701 |
1 2 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 |
name: "WriteCode"
description: "Given goal and code library location, generate code to achieve the goal and write the code to the file"
input_interface:
- "goal"
- "file_location"
output_interface:
- "code_writer_output"
subflows_config:
CodeGenerator:
_target_: Tachi67.WriteCodeFlowModule.CodeGeneratorAtomicFlow.instantiate_from_default_config
backend:
api_infos: ???
model_name:
openai: gpt-4
azure: azure/gpt-4
CodeFileEditor:
_target_: Tachi67.WriteCodeFlowModule.CodeFileEditorAtomicFlow.instantiate_from_default_config
early_exit_key: "EARLY_EXIT"
topology:
- goal: "Generate code to achieve the task."
input_interface:
_target_: flows.interfaces.KeyInterface
additional_transformations:
- _target_: flows.data_transformations.KeyMatchInput
flow: CodeGenerator
reset: false
- goal: "Write the code to the specified file location"
input_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["file_location", "code", "language_of_code"]
flow: CodeFileEditor
output_interface:
_target_: flows.interfaces.KeyInterface
keys_to_select: ["code_writer_output"]
reset: false |