diff --git a/swarms/agents/multi_modal_agent.py b/swarms/agents/multi_modal_agent.py index be6831cd..31de5ece 100644 --- a/swarms/agents/multi_modal_agent.py +++ b/swarms/agents/multi_modal_agent.py @@ -1,3 +1,5 @@ +from agent_protocol import Agent, Step, Task + from swarms.workers.multi_modal_workers.multi_modal_agent import MultiModalVisualAgent class MultiModalVisualAgent: @@ -6,8 +8,27 @@ class MultiModalVisualAgent: agent: MultiModalVisualAgent ): self.agent = agent + self.plan = plan - def _run(self, text: str) -> str: + async def run(self, text: str) -> str: #run the multi-modal visual agent with the give task return self.agent.run_text(text) + + async def __call__(self, text: str) -> str: + return self.agent.run(text) + + async def plan(self, step: Step) -> Step: + task = Agent + pass + async def task_handler(self, task: Task): + await self.agent.run() + + async def step_handler(self, step: Step): + if step.name == "plan": + await self.plan(step) + else: + await self.agent.run(step) + + return step + diff --git a/swarms/agents/omni_modal_agent.py b/swarms/agents/omni_modal_agent.py index a0d183a2..5e842dd6 100644 --- a/swarms/agents/omni_modal_agent.py +++ b/swarms/agents/omni_modal_agent.py @@ -3,11 +3,11 @@ from swarms.workers.multi_modal_workers.omni_agent.omni_chat import chat_hugging class OmniModalAgent: def __init__( - self, - api_key, - api_endpoint, - api_type - ): + self, + api_key, + api_endpoint, + api_type + ): self.api_key = api_key self.api_endpoint = api_endpoint self.api_type = api_type