main
Kye 2 years ago
parent 9a4d748fb5
commit ef2ae6d94a

@ -20,4 +20,6 @@ I want it to have neumorphism-style. Serve it on port 4500.
"""
# Run Swarms
swarm.run_swarms(objective)
task = swarm.run_swarms(objective)
print(task)

@ -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)

@ -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

@ -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)
Loading…
Cancel
Save