nbaldwin commited on
Commit
df4c47c
·
1 Parent(s): 9cf11c1

Proper Doc

Browse files
Files changed (1) hide show
  1. README.md +66 -51
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
- * [prepare\_memory\_read\_input](#AutoGPTFlow.AutoGPTFlow.prepare_memory_read_input)
10
  * [prepare\_memory\_read\_output](#AutoGPTFlow.AutoGPTFlow.prepare_memory_read_output)
11
- * [detect\_finish\_or\_continue](#AutoGPTFlow.AutoGPTFlow.detect_finish_or_continue)
12
- * [detect\_finish\_in\_human\_input](#AutoGPTFlow.AutoGPTFlow.detect_finish_in_human_input)
 
 
 
 
 
13
 
14
  <a id="AutoGPTFlow"></a>
15
 
@@ -20,7 +24,7 @@ license: mit
20
  ## AutoGPTFlow Objects
21
 
22
  ```python
23
- class AutoGPTFlow(CircularFlow)
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.prepare_memory_read_input"></a>
86
 
87
- #### prepare\_memory\_read\_input
88
 
89
  ```python
90
- @CircularFlow.input_msg_payload_builder
91
- def prepare_memory_read_input(flow_state: Dict[str, Any],
92
- dst_flow: ChromaDBFlow) -> Dict[str, Any]
93
  ```
94
 
95
- This method prepares the input for the Memory Flow. It is called before the Memory Flow is called.
96
 
97
- A (very) basic example implementation of how the memory retrieval could be constructed.
98
 
99
- **Arguments**:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
- - `flow_state` (`Dict[str, Any]`): The state of the flow
102
- - `dst_flow` (`Flow`): The destination flow
103
 
104
  **Returns**:
105
 
106
- `Dict[str, Any]`: The input message for the Memory Flow
107
 
108
- <a id="AutoGPTFlow.AutoGPTFlow.prepare_memory_read_output"></a>
109
 
110
- #### prepare\_memory\_read\_output
111
 
112
  ```python
113
- @CircularFlow.output_msg_payload_processor
114
- def prepare_memory_read_output(output_payload: Dict[str, Any],
115
- src_flow: ControllerAtomicFlow)
116
  ```
117
 
118
- This method processes the output of the Memory Flow. It is called after the Memory Flow is called.
119
 
120
- **Arguments**:
121
 
122
- - `output_payload` (`Dict[str, Any]`): The output payload of the Memory Flow
123
- - `src_flow` (`Flow`): The source flow
124
 
125
- **Returns**:
 
 
 
 
 
 
126
 
127
- `Dict[str, Any]`: The processed output payload
128
 
129
- <a id="AutoGPTFlow.AutoGPTFlow.detect_finish_or_continue"></a>
130
 
131
- #### detect\_finish\_or\_continue
132
 
133
  ```python
134
- @CircularFlow.output_msg_payload_processor
135
- def detect_finish_or_continue(
136
- output_payload: Dict[str, Any],
137
- src_flow: ControllerAtomicFlow) -> Dict[str, Any]
138
  ```
139
 
140
- This method detects whether the Controller flow has generated a "finish" command or not to terminate the flow. . It is called after the Controller Flow is called.
141
 
142
- **Arguments**:
143
 
144
- - `output_payload` (`Dict[str, Any]`): The output payload of the Controller Flow
145
- - `src_flow` (`Flow`): The source flow
146
 
147
- **Returns**:
 
 
148
 
149
- `Dict[str, Any]`: The processed output payload
150
 
151
- <a id="AutoGPTFlow.AutoGPTFlow.detect_finish_in_human_input"></a>
152
 
153
- #### detect\_finish\_in\_human\_input
154
 
155
  ```python
156
- @CircularFlow.output_msg_payload_processor
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 detects whether the HumanFeedback (the human/user) flow has generated a "finish" command or not to terminate the flow. It is called after the HumanFeedback Flow is called.
163
 
164
- **Arguments**:
165
 
166
- - `output_payload` (`Dict[str, Any]`): The output payload of the HumanFeedback Flow
167
- - `src_flow` (`Flow`): The source flow
168
 
169
- **Returns**:
 
 
 
 
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