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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Table of Contents
|
| 2 |
+
|
| 3 |
+
* [SaveCodeAtomicFlow](#SaveCodeAtomicFlow)
|
| 4 |
+
* [SaveCodeAtomicFlow](#SaveCodeAtomicFlow.SaveCodeAtomicFlow)
|
| 5 |
+
* [run](#SaveCodeAtomicFlow.SaveCodeAtomicFlow.run)
|
| 6 |
+
* [ExtLibAskUserFlow](#ExtLibAskUserFlow)
|
| 7 |
+
* [ExtLibAskUserFlow](#ExtLibAskUserFlow.ExtLibAskUserFlow)
|
| 8 |
+
* [ExtendLibraryFlow](#ExtendLibraryFlow)
|
| 9 |
+
* [ExtendLibraryFlow](#ExtendLibraryFlow.ExtendLibraryFlow)
|
| 10 |
+
* [UpdatePlanAtomicFlow](#UpdatePlanAtomicFlow)
|
| 11 |
+
* [UpdatePlanAtomicFlow](#UpdatePlanAtomicFlow.UpdatePlanAtomicFlow)
|
| 12 |
+
* [run\_ExtendLibrary](#run_ExtendLibrary)
|
| 13 |
+
* [CtrlExMem\_ExtLib](#CtrlExMem_ExtLib)
|
| 14 |
+
* [CtrlExMem\_ExtLib](#CtrlExMem_ExtLib.CtrlExMem_ExtLib)
|
| 15 |
+
* [ControllerFlow\_ExtLib](#ControllerFlow_ExtLib)
|
| 16 |
+
* [ControllerFlow\_ExtLib](#ControllerFlow_ExtLib.ControllerFlow_ExtLib)
|
| 17 |
+
* [\_\_init\_\_](#__init__)
|
| 18 |
+
|
| 19 |
+
<a id="SaveCodeAtomicFlow"></a>
|
| 20 |
+
|
| 21 |
+
# SaveCodeAtomicFlow
|
| 22 |
+
|
| 23 |
+
<a id="SaveCodeAtomicFlow.SaveCodeAtomicFlow"></a>
|
| 24 |
+
|
| 25 |
+
## SaveCodeAtomicFlow Objects
|
| 26 |
+
|
| 27 |
+
```python
|
| 28 |
+
class SaveCodeAtomicFlow(AtomicFlow)
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
This flow appends the code to the code library file.
|
| 32 |
+
*Input Interface*:
|
| 33 |
+
- `code` (str): the code to be appended to the code library
|
| 34 |
+
- `memory_files` (dict): the dictionary of memory files
|
| 35 |
+
|
| 36 |
+
*Output Interface*:
|
| 37 |
+
- `result` (str): the result of the flow, to be returned to the controller of the caller
|
| 38 |
+
- `summary` (str): the summary of the flow, to be appended to logs
|
| 39 |
+
|
| 40 |
+
<a id="SaveCodeAtomicFlow.SaveCodeAtomicFlow.run"></a>
|
| 41 |
+
|
| 42 |
+
#### run
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
def run(input_data: Dict[str, Any])
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
Run the flow
|
| 49 |
+
|
| 50 |
+
**Arguments**:
|
| 51 |
+
|
| 52 |
+
- `input_data`: the input data
|
| 53 |
+
|
| 54 |
+
**Returns**:
|
| 55 |
+
|
| 56 |
+
the output data
|
| 57 |
+
|
| 58 |
+
<a id="ExtLibAskUserFlow"></a>
|
| 59 |
+
|
| 60 |
+
# ExtLibAskUserFlow
|
| 61 |
+
|
| 62 |
+
<a id="ExtLibAskUserFlow.ExtLibAskUserFlow"></a>
|
| 63 |
+
|
| 64 |
+
## ExtLibAskUserFlow Objects
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
class ExtLibAskUserFlow(HumanStandardInputFlow)
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
This class is used to ask for user feedback whenever the controller is unsure of something, or need confirmation, etc.
|
| 71 |
+
|
| 72 |
+
*Expected Input*:
|
| 73 |
+
- `question`: The question asked by the controller
|
| 74 |
+
|
| 75 |
+
*Expected Behaviour*:
|
| 76 |
+
- The question is displayed, and the user gives feedback by inputing string.
|
| 77 |
+
|
| 78 |
+
*Expected Ouput*:
|
| 79 |
+
- `result`: The input of the user.
|
| 80 |
+
- `summary`: The summary that will be written by the caller.
|
| 81 |
+
|
| 82 |
+
<a id="ExtendLibraryFlow"></a>
|
| 83 |
+
|
| 84 |
+
# ExtendLibraryFlow
|
| 85 |
+
|
| 86 |
+
<a id="ExtendLibraryFlow.ExtendLibraryFlow"></a>
|
| 87 |
+
|
| 88 |
+
## ExtendLibraryFlow Objects
|
| 89 |
+
|
| 90 |
+
```python
|
| 91 |
+
class ExtendLibraryFlow(AbstractBossFlow)
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
ExtendLibraryFlow is one branch executor of CoderFlow. At a higher level, it takes the goal
|
| 95 |
+
from the Coder, writes functions in an interactive way, test the code and append the newly written function to
|
| 96 |
+
the code library.
|
| 97 |
+
|
| 98 |
+
Workflow of ExtendLibrary:
|
| 99 |
+
0. Coder calls ExtendLibrary with a goal.
|
| 100 |
+
1. MemoryReading reads logs, plan, and code library.
|
| 101 |
+
2. Planner makes a plan based on the goal.
|
| 102 |
+
3. Write code in an interactive fashion.
|
| 103 |
+
4. Test code.
|
| 104 |
+
5. Finish, writes code to the library.
|
| 105 |
+
Step 3-5 is done via prompting the controller.
|
| 106 |
+
|
| 107 |
+
*Input Interface (expected input)*
|
| 108 |
+
- `goal` (str): The goal from the caller (source flow, i.e. CoderFlow)
|
| 109 |
+
*Output Interface (expected output)*
|
| 110 |
+
- `result` (str): The result of the flow, the result will be returned to the caller (i.e. CoderFlow).
|
| 111 |
+
- `summary` (str): The summary of the flow, the summary will be logged into the logs of the caller flow (i.e. CoderFlow).
|
| 112 |
+
|
| 113 |
+
<a id="UpdatePlanAtomicFlow"></a>
|
| 114 |
+
|
| 115 |
+
# UpdatePlanAtomicFlow
|
| 116 |
+
|
| 117 |
+
<a id="UpdatePlanAtomicFlow.UpdatePlanAtomicFlow"></a>
|
| 118 |
+
|
| 119 |
+
## UpdatePlanAtomicFlow Objects
|
| 120 |
+
|
| 121 |
+
```python
|
| 122 |
+
class UpdatePlanAtomicFlow(AtomicFlow)
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
Refer to: https://huggingface.co/Tachi67/CoderFlowModule/blob/main/UpdatePlanAtomicFlow.py
|
| 126 |
+
|
| 127 |
+
<a id="run_ExtendLibrary"></a>
|
| 128 |
+
|
| 129 |
+
# run\_ExtendLibrary
|
| 130 |
+
|
| 131 |
+
<a id="CtrlExMem_ExtLib"></a>
|
| 132 |
+
|
| 133 |
+
# CtrlExMem\_ExtLib
|
| 134 |
+
|
| 135 |
+
<a id="CtrlExMem_ExtLib.CtrlExMem_ExtLib"></a>
|
| 136 |
+
|
| 137 |
+
## CtrlExMem\_ExtLib Objects
|
| 138 |
+
|
| 139 |
+
```python
|
| 140 |
+
class CtrlExMem_ExtLib(CtrlExMemFlow)
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
This class inherits from the CtrlExMemFlow class from AbstractBossFlowModule.
|
| 144 |
+
See: https://huggingface.co/Tachi67/AbstractBossFlowModule/blob/main/CtrlExMemFlow.py
|
| 145 |
+
*Input Interface*:
|
| 146 |
+
- `plan`
|
| 147 |
+
- `logs`
|
| 148 |
+
- `memory_files`
|
| 149 |
+
- `goal`
|
| 150 |
+
*Output Interface*
|
| 151 |
+
- `result` (str): The result of the flow, the result will be returned to the caller.
|
| 152 |
+
- `summary` (str): The summary of the flow, the summary will be logged into the logs of the caller flow.
|
| 153 |
+
|
| 154 |
+
<a id="ControllerFlow_ExtLib"></a>
|
| 155 |
+
|
| 156 |
+
# ControllerFlow\_ExtLib
|
| 157 |
+
|
| 158 |
+
<a id="ControllerFlow_ExtLib.ControllerFlow_ExtLib"></a>
|
| 159 |
+
|
| 160 |
+
## ControllerFlow\_ExtLib Objects
|
| 161 |
+
|
| 162 |
+
```python
|
| 163 |
+
class ControllerFlow_ExtLib(ChatAtomicFlow)
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
Refer to: https://huggingface.co/Tachi67/JarvisFlowModule/blob/main/Controller_JarvisFlow.py
|
| 167 |
+
|
| 168 |
+
<a id="__init__"></a>
|
| 169 |
+
|
| 170 |
+
# \_\_init\_\_
|
| 171 |
+
|