Update ContentWritrerFlow.py
Browse files- ContentWritrerFlow.py +24 -0
ContentWritrerFlow.py
CHANGED
|
@@ -10,6 +10,30 @@ log = logging.get_logger(__name__)
|
|
| 10 |
|
| 11 |
|
| 12 |
class ContentWriterFlow(CircularFlow, ABC):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
@abstractmethod
|
| 14 |
def _on_reach_max_round(self):
|
| 15 |
"""
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
class ContentWriterFlow(CircularFlow, ABC):
|
| 13 |
+
"""This is an abstract class for writing content (plan, code)
|
| 14 |
+
The ContentWriterFlow is made of a controller and a branching executor.
|
| 15 |
+
Each time the controller is called, the controller decides whether to write content
|
| 16 |
+
or to finish. If the content writer executor is called, the executor will write content
|
| 17 |
+
in an interactive way, finally, the user is able to give feedback to the content, so that
|
| 18 |
+
the controller can decide whether to write content again or to finish.
|
| 19 |
+
|
| 20 |
+
*Configuration Parameters*:
|
| 21 |
+
- `name`
|
| 22 |
+
- `description`
|
| 23 |
+
- `max_round`
|
| 24 |
+
- `subflows_config`:
|
| 25 |
+
- `Controller` (dict): The controller that decides whether to write content or to finish.
|
| 26 |
+
- `Executor` (dict): A branching flow, we configure the specific executor in the subflows of the executor.
|
| 27 |
+
- `early_exit_key`: The key of the early exit variable in the output payload of the executor.
|
| 28 |
+
- `topology`: The topology of the subflows, this describes the I/O interface instances.
|
| 29 |
+
|
| 30 |
+
*Input Interface*:
|
| 31 |
+
- `goal`
|
| 32 |
+
|
| 33 |
+
*Output Interface*:
|
| 34 |
+
- `answer`
|
| 35 |
+
- `status`
|
| 36 |
+
"""
|
| 37 |
@abstractmethod
|
| 38 |
def _on_reach_max_round(self):
|
| 39 |
"""
|