WriteCodeFlowModule / WriteCodeFlow.yaml
Tachi67's picture
Update WriteCodeFlow.yaml
0fe7701
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