OperationcodeCreatorAgent2:ソースコード:flow:FlowClearMemory.py

from flow.FlowSequentialBase import FlowSequentialBase
from Agents.AIAgent import AIAgent


class FlowClearMemory(FlowSequentialBase):
    def __init__(self, agent=None):
        super().__init__()
        self.set_category("flow")
        self.set_type("while")

        if None is agent:
            self.agent = agent
        else:
            agent = AIAgent("none", "", [])

    def run(self, command=None, pre_respons=None, flow_data=None):
        self.agent.clear_memory()