Proper Doc
Browse files
README.md
CHANGED
@@ -1,15 +1,19 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
4 |
-
|
5 |
# Table of Contents
|
6 |
|
7 |
* [AutoGPTFlow](#AutoGPTFlow)
|
8 |
* [AutoGPTFlow](#AutoGPTFlow.AutoGPTFlow)
|
9 |
-
* [
|
10 |
* [prepare\_memory\_read\_output](#AutoGPTFlow.AutoGPTFlow.prepare_memory_read_output)
|
11 |
-
* [
|
12 |
-
* [
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
<a id="AutoGPTFlow"></a>
|
15 |
|
@@ -20,7 +24,7 @@ license: mit
|
|
20 |
## AutoGPTFlow Objects
|
21 |
|
22 |
```python
|
23 |
-
class AutoGPTFlow(
|
24 |
```
|
25 |
|
26 |
This class implements a (very basic) AutoGPT flow. It is a flow that consists of multiple sub-flows that are executed circularly. It Contains the following subflows:
|
@@ -82,91 +86,102 @@ An illustration of the flow is as follows:
|
|
82 |
- `flow_config` (`Dict[str,Any]`): The configuration of the flow. Contains the parameters described above and the parameters required by the parent class (CircularFlow).
|
83 |
- `subflows` (`List[Flow]`): A list of subflows constituating the circular flow. Required when instantiating the subflow programmatically (it replaces subflows_config from flow_config).
|
84 |
|
85 |
-
<a id="AutoGPTFlow.AutoGPTFlow.
|
86 |
|
87 |
-
####
|
88 |
|
89 |
```python
|
90 |
-
|
91 |
-
def prepare_memory_read_input(flow_state: Dict[str, Any],
|
92 |
-
dst_flow: ChromaDBFlow) -> Dict[str, Any]
|
93 |
```
|
94 |
|
95 |
-
This method
|
96 |
|
97 |
-
|
98 |
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
-
|
102 |
-
- `dst_flow` (`Flow`): The destination flow
|
103 |
|
104 |
**Returns**:
|
105 |
|
106 |
-
`Dict[str, Any]`: The input
|
107 |
|
108 |
-
<a id="AutoGPTFlow.AutoGPTFlow.
|
109 |
|
110 |
-
#### prepare\_memory\
|
111 |
|
112 |
```python
|
113 |
-
|
114 |
-
def prepare_memory_read_output(output_payload: Dict[str, Any],
|
115 |
-
src_flow: ControllerAtomicFlow)
|
116 |
```
|
117 |
|
118 |
-
This method
|
119 |
|
120 |
-
**
|
121 |
|
122 |
-
|
123 |
-
- `src_flow` (`Flow`): The source flow
|
124 |
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
-
|
128 |
|
129 |
-
<a id="AutoGPTFlow.AutoGPTFlow.
|
130 |
|
131 |
-
####
|
132 |
|
133 |
```python
|
134 |
-
|
135 |
-
def detect_finish_or_continue(
|
136 |
-
output_payload: Dict[str, Any],
|
137 |
-
src_flow: ControllerAtomicFlow) -> Dict[str, Any]
|
138 |
```
|
139 |
|
140 |
-
This method
|
141 |
|
142 |
-
|
143 |
|
144 |
-
|
145 |
-
- `src_flow` (`Flow`): The source flow
|
146 |
|
147 |
-
|
|
|
|
|
148 |
|
149 |
-
|
150 |
|
151 |
-
<a id="AutoGPTFlow.AutoGPTFlow.
|
152 |
|
153 |
-
####
|
154 |
|
155 |
```python
|
156 |
-
|
157 |
-
def detect_finish_in_human_input(
|
158 |
-
output_payload: Dict[str, Any],
|
159 |
-
src_flow: ControllerAtomicFlow) -> Dict[str, Any]
|
160 |
```
|
161 |
|
162 |
-
This method
|
163 |
|
164 |
-
|
165 |
|
166 |
-
|
167 |
-
- `src_flow` (`Flow`): The source flow
|
168 |
|
169 |
-
|
|
|
|
|
|
|
|
|
170 |
|
171 |
-
`Dict[str, Any]`: The processed output payload
|
172 |
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
---
|
|
|
4 |
# Table of Contents
|
5 |
|
6 |
* [AutoGPTFlow](#AutoGPTFlow)
|
7 |
* [AutoGPTFlow](#AutoGPTFlow.AutoGPTFlow)
|
8 |
+
* [set\_up\_flow\_state](#AutoGPTFlow.AutoGPTFlow.set_up_flow_state)
|
9 |
* [prepare\_memory\_read\_output](#AutoGPTFlow.AutoGPTFlow.prepare_memory_read_output)
|
10 |
+
* [prepare\_memory\_read\_input](#AutoGPTFlow.AutoGPTFlow.prepare_memory_read_input)
|
11 |
+
* [prepare\_memory\_write\_input](#AutoGPTFlow.AutoGPTFlow.prepare_memory_write_input)
|
12 |
+
* [call\_memory\_read](#AutoGPTFlow.AutoGPTFlow.call_memory_read)
|
13 |
+
* [call\_memory\_write](#AutoGPTFlow.AutoGPTFlow.call_memory_write)
|
14 |
+
* [call\_human\_feedback](#AutoGPTFlow.AutoGPTFlow.call_human_feedback)
|
15 |
+
* [register\_data\_to\_state](#AutoGPTFlow.AutoGPTFlow.register_data_to_state)
|
16 |
+
* [run](#AutoGPTFlow.AutoGPTFlow.run)
|
17 |
|
18 |
<a id="AutoGPTFlow"></a>
|
19 |
|
|
|
24 |
## AutoGPTFlow Objects
|
25 |
|
26 |
```python
|
27 |
+
class AutoGPTFlow(ControllerExecutorFlow)
|
28 |
```
|
29 |
|
30 |
This class implements a (very basic) AutoGPT flow. It is a flow that consists of multiple sub-flows that are executed circularly. It Contains the following subflows:
|
|
|
86 |
- `flow_config` (`Dict[str,Any]`): The configuration of the flow. Contains the parameters described above and the parameters required by the parent class (CircularFlow).
|
87 |
- `subflows` (`List[Flow]`): A list of subflows constituating the circular flow. Required when instantiating the subflow programmatically (it replaces subflows_config from flow_config).
|
88 |
|
89 |
+
<a id="AutoGPTFlow.AutoGPTFlow.set_up_flow_state"></a>
|
90 |
|
91 |
+
#### set\_up\_flow\_state
|
92 |
|
93 |
```python
|
94 |
+
def set_up_flow_state()
|
|
|
|
|
95 |
```
|
96 |
|
97 |
+
This method sets up the state of the flow. It's called at the beginning of the flow.
|
98 |
|
99 |
+
<a id="AutoGPTFlow.AutoGPTFlow.prepare_memory_read_output"></a>
|
100 |
|
101 |
+
#### prepare\_memory\_read\_output
|
102 |
+
|
103 |
+
```python
|
104 |
+
def prepare_memory_read_output(data_dict: Dict[str, Any], **kwargs)
|
105 |
+
```
|
106 |
+
|
107 |
+
This method prepares the output of the Memory Flow to be used by the Controller Flow.
|
108 |
+
|
109 |
+
<a id="AutoGPTFlow.AutoGPTFlow.prepare_memory_read_input"></a>
|
110 |
+
|
111 |
+
#### prepare\_memory\_read\_input
|
112 |
+
|
113 |
+
```python
|
114 |
+
def prepare_memory_read_input() -> Dict[str, Any]
|
115 |
+
```
|
116 |
|
117 |
+
This method prepares the input of the Memory Flow to read memories
|
|
|
118 |
|
119 |
**Returns**:
|
120 |
|
121 |
+
`Dict[str, Any]`: The input of the Memory Flow to read memories
|
122 |
|
123 |
+
<a id="AutoGPTFlow.AutoGPTFlow.prepare_memory_write_input"></a>
|
124 |
|
125 |
+
#### prepare\_memory\_write\_input
|
126 |
|
127 |
```python
|
128 |
+
def prepare_memory_write_input() -> Dict[str, Any]
|
|
|
|
|
129 |
```
|
130 |
|
131 |
+
This method prepares the input of the Memory Flow to write memories
|
132 |
|
133 |
+
**Returns**:
|
134 |
|
135 |
+
`Dict[str, Any]`: The input of the Memory Flow to write memories
|
|
|
136 |
|
137 |
+
<a id="AutoGPTFlow.AutoGPTFlow.call_memory_read"></a>
|
138 |
+
|
139 |
+
#### call\_memory\_read
|
140 |
+
|
141 |
+
```python
|
142 |
+
def call_memory_read()
|
143 |
+
```
|
144 |
|
145 |
+
This method calls the Memory Flow to read memories.
|
146 |
|
147 |
+
<a id="AutoGPTFlow.AutoGPTFlow.call_memory_write"></a>
|
148 |
|
149 |
+
#### call\_memory\_write
|
150 |
|
151 |
```python
|
152 |
+
def call_memory_write()
|
|
|
|
|
|
|
153 |
```
|
154 |
|
155 |
+
This method calls the Memory Flow to write memories.
|
156 |
|
157 |
+
<a id="AutoGPTFlow.AutoGPTFlow.call_human_feedback"></a>
|
158 |
|
159 |
+
#### call\_human\_feedback
|
|
|
160 |
|
161 |
+
```python
|
162 |
+
def call_human_feedback()
|
163 |
+
```
|
164 |
|
165 |
+
This method calls the HumanFeedback Flow to get feedback from the user/human.
|
166 |
|
167 |
+
<a id="AutoGPTFlow.AutoGPTFlow.register_data_to_state"></a>
|
168 |
|
169 |
+
#### register\_data\_to\_state
|
170 |
|
171 |
```python
|
172 |
+
def register_data_to_state(input_message)
|
|
|
|
|
|
|
173 |
```
|
174 |
|
175 |
+
This method registers the data from the input message to the state of the flow.
|
176 |
|
177 |
+
<a id="AutoGPTFlow.AutoGPTFlow.run"></a>
|
178 |
|
179 |
+
#### run
|
|
|
180 |
|
181 |
+
```python
|
182 |
+
def run(input_message)
|
183 |
+
```
|
184 |
+
|
185 |
+
This method runs the flow. It's the main method of the flow. It's called when the flow is executed. It calls the subflows circularly.
|
186 |
|
|
|
187 |
|