Views
No views yet
goal, memory_files (dict)
|
v
+-------------------+
| MemoryReading | Reads in the content of the memory files
| Flow |
+-------------------+
|
| (memory_content)
|
v
+-------------------+
| PlanWriter | Writes a step-by-step plan to achieve the goal
+-------------------+
|
| (plan)
|
v
+-------------------+
| CtrlExMemFlow | Illustrated below. Carries out the plan in an controller-executor fashion,
| | with memory management mechanisms.
+-------------------+
|
(summary, result)
CtrlExMemFlow: plan, memory_files, memory_content, goal
|
v
+---------------+
| Controller | --------<<<<-----------+
+---------------+ |
| |
| (command, command args) |
| |
v |
+------------------+ |
| Executor | Each branch is an |
| (Tree Structure) | executor |
+------------------+ |
| ^
| (execution results) ^
| ^
v ^
+---------------+ ^
| MemWriteFlow | Updates memory files ^
+---------------+ ^
| ^
| (summary) |
| |
v |
+---------------+ |
| MemReadFlow | Reads updated memory |
+---------------+ |
| |
| (updated memory content) |
| |
+-> goes back to the Controller>-+
+-------------------+
| Branching |
| Executor |
+-------------------+
/ | | | \
/ | | | \
/ | | | \
/ | | | \
Extend_library ask_user re_plan update_plan run_code
class CtrlExMem_CoderFlow(CtrlExMemFlow)planlogscode_library: the signatures and docstring of the functions in the code library.memory_filesgoalresult (str): The result of the flow, the result will be returned to the caller.summary (str): The summary of the flow, the summary will be logged into the logs of the caller flow.input_interface: the input interface of the flowoutput_interface: the output interface of the flowsubflows_config: the configuration of the subflows1@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 source flow of the messageDict[str, Any]: the output payload of the flowclass Planner_CoderFlow(PlanWriterFlow)goalmemory_filescode_libraryplansummarystatusinput_interface: the input interface of the flow, default: ["goal", "memory_files", "code_library"]output_interface: the output interface of the flow, default: ["plan", "summary", "status"]subflows_config: configuration of the subflows.topology: topology of the subflows.class Controller_CoderFlow(ChatAtomicFlow)goalplancode_librarylogsmemory_filesgoalplancode_librarylogsmemory_filesresultcommandcommand_argsInput Interface Non Initialized: Input interface before the conversation is initialized.Input Interface Initialized: Input interface after the conversation is initialized.Output Interface: Output interface.backend: The backend of the LLM.command: A list of available commands for the controller to call.system_message_prompt_template: The template of the system message prompt.init_human_message_prompt_template: The template of the initial human message prompt.human_message_prompt_template: The template of the human message prompt.previous_messages: The sliding window of previous messages.def __init__(commands: List[Command], **kwargs)commands (List[Command]): A list of available commands for the controller to call.kwargs (Dict[str, Any]): Refer to the configuration parameters.1@classmethod
2def instantiate_from_config(cls, config)config (Dict[str, Any]): The configuration.Controller_CoderFlow: The instantiated flow.def run(input_data: Dict[str, Any]) -> Dict[str, Any]input_data (Dict[str, Any]): The input data.Dict[str, Any]: The output data.class UpdatePlanAtomicFlow(AtomicFlow)updated_plan: the updated plan in string formatresult: the result of the update plan operationinput_interface: the input interface of the flow, default: ["updated_plan"]output_interface: the output interface of the flow, default: ["result"]def run(input_data: Dict[str, Any])input_data (Dict[str, Any]): the input data to the flowDict[str, Any]: the output data of the flowclass CoderFlow(AbstractBossFlow)goal (str): The goal from the caller (source flow, i.e. JarvisFlow)result (str): The result of the flow, the result will be returned to the caller (i.e. JarvisFlow).summary (str): The summary of the flow, the summary will be logged into the logs of the caller flow (i.e. JarvisFlow).memory_files (dict): The memory files of the flow. The memory files are the files that the flow reads and writes. Typically it should contain plan, logs, and code_library.def run(input_data: Dict[str, Any]) -> Dict[str, Any]input_data (Dict[str, Any]): The input data of the flow.Dict[str, Any]: The output data of the flow.