Update InteractiveCodeGenFlow.py
Browse files- InteractiveCodeGenFlow.py +14 -0
InteractiveCodeGenFlow.py
CHANGED
@@ -8,6 +8,20 @@ logging.set_verbosity_debug()
|
|
8 |
log = logging.get_logger(__name__)
|
9 |
|
10 |
class InteractiveCodeGenFlow(SequentialFlow):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
REQUIRED_KEYS_CONFIG = ["max_rounds", "early_exit_key", "topology", "memory_files"]
|
12 |
|
13 |
def __init__(
|
|
|
8 |
log = logging.get_logger(__name__)
|
9 |
|
10 |
class InteractiveCodeGenFlow(SequentialFlow):
|
11 |
+
"""This flow writes code in an interactive manner. It is a sequential flow composed of:
|
12 |
+
1. MemoryReading: reads in the code library.
|
13 |
+
2. CodeGenerator: generates code based on the goal and functions in the code library.
|
14 |
+
3. CodeFileEditor: writes the generated code to a temp file for the user to see, edit and provide feedback.
|
15 |
+
4. ParseFeedback: opens up the temp file with vscode and parses the feedback from the user.
|
16 |
+
|
17 |
+
*Input Interface*:
|
18 |
+
- `goal`
|
19 |
+
|
20 |
+
*Output Interface*:
|
21 |
+
- `code`
|
22 |
+
- `feedback`
|
23 |
+
- `temp_code_file_location`
|
24 |
+
"""
|
25 |
REQUIRED_KEYS_CONFIG = ["max_rounds", "early_exit_key", "topology", "memory_files"]
|
26 |
|
27 |
def __init__(
|