Update ExecuteCodeAtomicFlow.py
Browse files5 unmodified lines678910115 unmodified linesclass ExecuteCodeAtomicFlow(InterpreterAtomicFlow):def _prepare_code(self, input_data: Dict[str, Any]):file_location = input_data["temp_code_file_location"]start_marker = "# Code:\n"5 unmodified lines678910111213141516171819202122235 unmodified linesclass ExecuteCodeAtomicFlow(InterpreterAtomicFlow):"""This class inherits from InterpreterAtomicFlow and is used to execute code in a file.It opens up the file in VSCode and waits for the user to save the file. Once the file is saved, it reads the codefrom the file and executes it. It then returns the output of the execution.*Input Interface*:- temp_code_file_location: The location of the file containing the code to be executed.- language: The language of the code to be executed.*Output Interface*:- interpreter_output: The output of the execution of the code.- code_ran: The code that was executed."""def _prepare_code(self, input_data: Dict[str, Any]):file_location = input_data["temp_code_file_location"]start_marker = "# Code:\n"
ExecuteCodeAtomicFlow.py+12