Download WritePlanFlow.py from Tachi67/WritePlanFlowModule: direct link, hf CLI and curl.
- Browser
- Download file 658 Bytes
-
https://huggingface.co/Tachi67/WritePlanFlowModule/resolve/38fb5451aceb3006db41a15de09f2e97c03fd39d/WritePlanFlow.py
- Command line
-
hf download hf://Tachi67/WritePlanFlowModule@38fb5451aceb3006db41a15de09f2e97c03fd39d/WritePlanFlow.py
-
curl -L -o WritePlanFlow.py https://huggingface.co/Tachi67/WritePlanFlowModule/resolve/38fb5451aceb3006db41a15de09f2e97c03fd39d/WritePlanFlow.py
658 Bytes
| from typing import Dict, Any | |
| from flows.base_flows import SequentialFlow | |
| from flows.utils import logging | |
| from .PlanGeneratorAtomicFlow import PlanGeneratorAtomicFlow | |
| logging.set_verbosity_debug() | |
| log = logging.get_logger(__name__) | |
| class WritePlanFlow(SequentialFlow): | |
| def detect_finish_or_continue(self, output_payload: Dict[str, Any], src_flow: PlanGeneratorAtomicFlow) -> Dict[str, Any]: | |
| if "plan" not in output_payload: | |
| return { | |
| "EARLY_EXIT": True, | |
| "plan_writer_output": output_payload | |
| } | |
| else: | |
| return output_payload |