File size: 2,802 Bytes
302d1a3 8c42c74 302d1a3 1a76c93 |
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
### Structure of InteractiveCodeGenFlow
```
goal
|
|
|
v
+------------------+
| MemReading | Reads in the memory in the memory files. (https://huggingface.co/Tachi67/MemoryReadingFlowModule)https://huggingface.co/Tachi67/MemoryReadingFlowModule
+------------------+
|
| (code_library: function signatures of the library)
|
v
+------------------+
| CodeGenerator | Generates code given goal, function signatures of the library. (https://huggingface.co/Tachi67/CodeGeneratorFlowModule)
+------------------+
|
| (code, language_of_code)
|
v
+-------------------+
| CodeFileEdit | Edit a temp code file with the code generated. (https://huggingface.co/Tachi67/CodeFileEditFlowModule)
+-------------------+
|
| (temp_code_file_location)
|
v
+------------------+
| ParseFeedback | Opens up the temp file until user closes the file, parse for user feedback. (https://huggingface.co/Tachi67/ParseFeedbackFlowModule)
+------------------+
|
| (code, feedback)
|
v
code, feedback
```
Memory_files:
- library.py
# Table of Contents
* [InteractiveCodeGenFlow](#InteractiveCodeGenFlow)
* [InteractiveCodeGenFlow](#InteractiveCodeGenFlow.InteractiveCodeGenFlow)
* [\_\_init\_\_](#__init__)
<a id="InteractiveCodeGenFlow"></a>
# InteractiveCodeGenFlow
<a id="InteractiveCodeGenFlow.InteractiveCodeGenFlow"></a>
## 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`
<a id="__init__"></a>
# \_\_init\_\_
|