Views
No views yet
goal
|
v
+---------------+
| Controller | --------<<<<-----------+
+---------------+ |
| |
| (command, command args) |
| |
v |
+------------------+ |
| Executor | Each branch is an |
| (Tree Structure) | executor |
+------------------+ |
| ^
| (summary) |
| |
v |
| |
+-> goes back to the Controller>-+
+-------------------+
| Branching |
| Executor |
+-------------------+
/ | \
/ | \
/ | \
/ | \
write_code ask_user test
class CodeWriterCtrlFlow(ChatAtomicFlow)goalgoalcodefeedbackcommandcommand_argsbackend: the backend used to call the LLM.commands: a list of commands that the controller can use.system_message_prompt_template: the template of the system message prompt.init_human_message_prompt_template: the template of the init human (user) message prompt.human_message_prompt_template: the template of the human (user) message prompt.previous_messages: the sliding window of previous messages.class CodeWriterAskUserFlow(HumanStandardInputFlow)question: The question asked by the controllerfeedback: The input of the user.code: No code was written.query_message_prompt_template: The template of the message that is displayed to the user.request_multi_line_input: Whether the user should be able to input multiple lines. Default: False.end_of_input_string: The string that the user can input to indicate that he/she is done with the input. Default: EOIdef run(input_data: Dict[str, Any]) -> Dict[str, Any]input_data: The input data.class CodeWriterFlow(ContentWriterFlow)goalcoderesultsummarystatusname: Name of the flowdescription: Description of the flow_target_: The instantiation target of the flowinput_interface: The input to the flow. Inherited from ContentWriterFlow, in this case, it is goal.output_interface: The output of the flow.subflows_config: Configurations of subflowsearly_exit_keys: The keys that will trigger an early exit of the flowtopology: Configures the topology of the subflows, please have a special look at the I/O interfaces of the subflows.1@CircularFlow.output_msg_payload_processor
2def detect_finish_or_continue(output_payload: Dict[str, Any],
3 src_flow) -> Dict[str, Any]output_payload: The output payload of the subflowsrc_flow: The subflow that generated the output payloaddef run(input_data: Dict[str, Any]) -> Dict[str, Any]input_data: The input data of the flow