You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
596 B
17 lines
596 B
from swarms.agents.workers.multi_modal_workers.multi_modal_agent import MultiModalVisualAgent
|
|
from langchain.tools import BaseTool
|
|
|
|
class MultiModalVisualAgentTool(BaseTool):
|
|
name = "multi_visual_agent"
|
|
description = "Multi-Modal Visual agent tool"
|
|
|
|
def __init__(self, agent: MultiModalVisualAgent):
|
|
self.agent = agent
|
|
|
|
def _run(self, text: str) -> str:
|
|
#run the multi-modal visual agent with the give task
|
|
return self.agent.run_text(text)
|
|
|
|
|
|
multimodal_agent = MultiModalVisualAgent()
|
|
multimodal_agent_tool = MultiModalVisualAgentTool(multimodal_agent) |