diff --git a/example.py b/example.py index 70de7b80..a41f0995 100644 --- a/example.py +++ b/example.py @@ -20,4 +20,6 @@ I want it to have neumorphism-style. Serve it on port 4500. """ # Run Swarms -swarm.run_swarms(objective) \ No newline at end of file +task = swarm.run_swarms(objective) + +print(task) \ No newline at end of file diff --git a/swarms/agents/workers/auto_agent.py b/swarms/agents/workers/auto_agent.py index 7cc1d1ff..199d0d08 100644 --- a/swarms/agents/workers/auto_agent.py +++ b/swarms/agents/workers/auto_agent.py @@ -32,19 +32,9 @@ from langchain.embeddings import OpenAIEmbeddings from langchain.tools.human.tool import HumanInputRun # from swarms.agents.workers.auto_agent import -from agents.workers.multi_modal import MultiModalVisualAgent -from tools.main import Terminal, CodeWriter, CodeEditor, process_csv, WebpageQATool +from swarms.agents.workers.visual_agent import multimodal_agent_tool +from swarms.tools.main import Terminal, CodeWriter, CodeEditor, process_csv, WebpageQATool -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) class WorkerAgent: @@ -65,9 +55,6 @@ class WorkerAgent: query_website_tool = WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)) web_search = DuckDuckGoSearchRun() - multimodal_agent = MultiModalVisualAgent() - multimodal_agent_tool = MultiModalVisualAgentTool(multimodal_agent) - tools = [ web_search, WriteFileTool(root_dir="./data"), @@ -102,7 +89,7 @@ class WorkerAgent: # worker_agent = WorkerAgent(objective, api_key) -objective = "Your objective here" +# objective = "Your objective here" -worker_agent = WorkerAgent(objective) +# worker_agent = WorkerAgent(objective) diff --git a/swarms/agents/workers/multi_modal/__init__.py b/swarms/agents/workers/multi_modal/__init__.py new file mode 100644 index 00000000..45040ecd --- /dev/null +++ b/swarms/agents/workers/multi_modal/__init__.py @@ -0,0 +1,2 @@ +from swarms.agents.workers.multi_modal.multi_modal_agent import MultiModalVisualAgent +from swarms.agents.workers.multi_modal.omni_agent import chat_huggingface \ No newline at end of file diff --git a/swarms/agents/workers/multi_modal.py b/swarms/agents/workers/multi_modal/multi_modal_agent.py similarity index 100% rename from swarms/agents/workers/multi_modal.py rename to swarms/agents/workers/multi_modal/multi_modal_agent.py diff --git a/swarms/agents/workers/visual_agent.py b/swarms/agents/workers/visual_agent.py new file mode 100644 index 00000000..5585df52 --- /dev/null +++ b/swarms/agents/workers/visual_agent.py @@ -0,0 +1,17 @@ +from swarms.agents.workers.multi_modal.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) \ No newline at end of file