# Table of Contents * [InteractiveCodeGenFlow](#InteractiveCodeGenFlow) * [InteractiveCodeGenFlow](#InteractiveCodeGenFlow.InteractiveCodeGenFlow) * [\_\_init\_\_](#InteractiveCodeGenFlow.InteractiveCodeGenFlow.__init__) * [instantiate\_from\_config](#InteractiveCodeGenFlow.InteractiveCodeGenFlow.instantiate_from_config) * [run](#InteractiveCodeGenFlow.InteractiveCodeGenFlow.run) * [run](#run) * [\_\_init\_\_](#__init__) # InteractiveCodeGenFlow ## InteractiveCodeGenFlow Objects ```python class InteractiveCodeGenFlow(SequentialFlow) ``` This flow writes code in an interactive manner. It is a sequential flow composed of: 1. MemoryReading: reads in the code library. 2. CodeGenerator: generates code based on the goal and functions in the code library. 3. CodeFileEditor: writes the generated code to a temp file for the user to see, edit and provide feedback. 4. ParseFeedback: opens up the temp file with vscode and parses the feedback from the user. *Input Interface*: - `goal` *Output Interface*: - `code` - `feedback` - `temp_code_file_location` *Configuration Parameters*: - `input_interface`: the input interface of the flow. - `output_interface`: the output interface of the flow. - `subflows_config`: the configuration of the subflows. - `early_exit_key`: the key in the state dict that indicates whether the flow should exit early. - `topology`: the topology of the subflows. #### \_\_init\_\_ ```python def __init__(memory_files: Dict[str, Any], **kwargs) ``` This function initializes the flow. **Arguments**: - `memory_files` (`Dict[str, Any]`): the memory files that are used in the flow. - `kwargs` (`Any`): the keyword arguments. #### instantiate\_from\_config ```python @classmethod def instantiate_from_config(cls, config) ``` This function instantiates the flow from a configuration. **Arguments**: - `config` (`Dict[str, Any]`): the configuration of the flow. **Returns**: `Flow`: the instantiated flow. #### run ```python def run(input_data: Dict[str, Any]) -> Dict[str, Any] ``` This function runs the flow. **Arguments**: - `input_data` (`Dict[str, Any]`): the input data to the flow. **Returns**: `Dict[str, Any]`: the output data from the flow. # run # \_\_init\_\_