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_plan ask_user
class PlanWriterAskUserFlow(HumanStandardInputFlow)questionfeedbackplanquery_message_prompt_template: The message template to prompt the user for input.request_multi_line_input_flag: Whether to request multi-line input from the user.end_of_input_string: The string to enter to indicate the end of input.def run(input_data: Dict[str, Any]) -> Dict[str, Any]input_data (Dict[str, Any]): The input data to the flow module.Dict[str, Any]: The output data from the flow module.class PlanWriterFlow(ContentWriterFlow)goalplanresultsummarystatusinput_interface: the input interface of the flowoutput_interface: the output interface of the flowsubflows_config: the configuration of the subflowsearly_exit_key: the key in the flow state that indicates the early exit conditiontopology: the topology of the flow1@CircularFlow.output_msg_payload_processor
2def detect_finish_or_continue(output_payload: Dict[str, Any],
3 src_flow) -> Dict[str, Any]output_payload (Dict[str, Any]): the output payload of the subflowsrc_flow (Flow): the subflow that generates the output payloadDict[str, Any]: the processed output payloaddef run(input_data: Dict[str, Any]) -> Dict[str, Any]input_data (Dict[str, Any]): the input data of the flowDict[str, Any]: the output data of the flowclass PlanWriterCtrlFlow(ChatAtomicFlow)goal: strfeedback: strgoal: strplan: strcommand: strcommand_args: Dict[str, Any]input_interface_non_initialized: List[str] = ["goal"]input_interface_initialized: List[str] = ["feedback", "goal", "plan"]output_interface: List[str] = ["command", "command_args"]backend: Dict[str, Any] : backend of the LLMcommands: List[Dict[str, Any]] : commands that the LLM can executesystem_message_prompt_template: str : the template of the system message promptinit_human_message_prompt_template: str : the template of the initial human message prompthuman_message_prompt_template: str : the template of the human message promptprevious_messages: Dict[str, Any] : the previous messages of the conversation (sliding window)def __init__(commands: List[Command], **kwargs)commands (List[Command]): List[Command] : commands that the LLM can executekwargs (Dict[str, Any]): other parameters1@classmethod
2def instantiate_from_config(cls, config)config (Dict[str, Any]): the config of the flowChatAtomicFlow: the instantiated flowdef run(input_data: Dict[str, Any]) -> Dict[str, Any]input_data (Dict[str, Any]): the input dataDict[str, Any]: the output of the flow