Table of Contents
- CtrlExMem_CoderFlow
- run_coder
- Planner_CoderFlow
- Controller_CoderFlow
- UpdatePlanAtomicFlow
- CoderFlow
- __init__
CtrlExMem_CoderFlow
CtrlExMem_CoderFlow Objects
class CtrlExMem_CoderFlow(CtrlExMemFlow)
This class inherits from the CtrlExMemFlow class from AbstractBossFlowModule. See: https://huggingface.co/Tachi67/AbstractBossFlowModule/blob/main/CtrlExMemFlow.py
Input Interface:
planlogscode_library: the signatures and docstring of the functions in the code library.memory_filesgoal
Output Interface
result(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.
run_coder
Planner_CoderFlow
Planner_CoderFlow Objects
class Planner_CoderFlow(PlanWriterFlow)
Planner of the coder flow, it inherits from PlanWriterFlow, see: https://huggingface.co/Tachi67/PlanWriterFlowModule
Controller_CoderFlow
Controller_CoderFlow Objects
class Controller_CoderFlow(ChatAtomicFlow)
Refer to: https://huggingface.co/Tachi67/JarvisFlowModule/blob/main/Controller_JarvisFlow.py
UpdatePlanAtomicFlow
UpdatePlanAtomicFlow Objects
class UpdatePlanAtomicFlow(AtomicFlow)
This flow updates the plan file with the updated plan. The controller should pass the updated plan to this flow. This design (controller reflect on the existing plan--update plan) is intended to let the controller more aware of the plan it has. However one setback is that this process in then not deterministic.
Input Interface
updated_plan: the updated plan in string format
Output Interface
result: the result of the update plan operation
CoderFlow
CoderFlow Objects
class CoderFlow(AbstractBossFlow)
Coder flow is one executor branch of the Jarvis flow. At a higher level, it is a flow that writes and runs code given a goal. In the Jarvis flow, the Coder flow in invoked by the controller, The Coder flow receives the goal generated by the controller, writes and runs code in an interactive fashion.
The Coder flow has the similar structure as the Jarvis flow (inherited from AbstractBossFlow).
Input Interface (expected input)
goal(str): The goal from the caller (source flow, i.e. JarvisFlow)
Output Interface (expected output)
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).
Typical workflow of Coder: 0. JarvisFlow calls Coder with a goal.
- MemoryReading reads plans, logs and code library.
- Planner makes plan based on goal.
- Extend library with the goal given by the controller.
- Run code with code (possibly calls the newly written function) given by the controller.
- Finish and give an answer.
run
def run(input_data: Dict[str, Any]) -> Dict[str, Any]
The run function of the Coder flow.
Arguments:
input_data(Dict[str, Any]): The input data of the flow.
Returns:
Dict[str, Any]: The output data of the flow.