diff --git a/api/olds/container.py b/api/olds/container.py index 212520f7..4d037484 100644 --- a/api/olds/container.py +++ b/api/olds/container.py @@ -7,11 +7,11 @@ from fastapi.templating import Jinja2Templates from swarms.agents.utils.agent_creator import AgentManager from swarms.utils.main import BaseHandler, FileHandler, FileType -from swarms.tools.main import ExitConversation, RequestsGet, CodeEditor, Terminal +from swarms.agents.tools.main import ExitConversation, RequestsGet, CodeEditor, Terminal from swarms.utils.main import CsvToDataframe -from swarms.tools.main import BaseToolSet +from swarms.agents.tools.main import BaseToolSet from swarms.utils.main import StaticUploader @@ -31,8 +31,8 @@ if os.environ["USE_GPU"]: import torch # from core.handlers.image import ImageCaptioning - from swarms.tools.main import ImageCaptioning - from swarms.tools.main import ( + from swarms.agents.tools.main import ImageCaptioning + from swarms.agents.tools.main import ( ImageEditing, InstructPix2Pix, Text2Image, diff --git a/swarms/agents/boss/BossNode.py b/swarms/agents/boss/BossNode.py index d238e276..68462f3b 100644 --- a/swarms/agents/boss/BossNode.py +++ b/swarms/agents/boss/BossNode.py @@ -1,7 +1,7 @@ from pydantic import ValidationError import logging -from swarms.tools.agent_tools import * +from swarms.agents.tools.agent_tools import * logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/swarms/agents/tools/__init__.py b/swarms/agents/tools/__init__.py index d5ab50b6..05bbf557 100644 --- a/swarms/agents/tools/__init__.py +++ b/swarms/agents/tools/__init__.py @@ -1,3 +1,3 @@ # from swarms.agents.workers import multimodal_agent_tool -from swarms.tools.main import process_csv, ReadFileTool, WriteFileTool, BaseTool, DuckDuckGoSearchRun +from swarms.agents.tools.main import process_csv, ReadFileTool, WriteFileTool, BaseTool, DuckDuckGoSearchRun # Terminal, CodeWriter, CodeEditor \ No newline at end of file diff --git a/swarms/agents/tools/agent_tools.py b/swarms/agents/tools/agent_tools.py index 02673df7..69ed7ec8 100644 --- a/swarms/agents/tools/agent_tools.py +++ b/swarms/agents/tools/agent_tools.py @@ -26,7 +26,7 @@ from langchain.tools.file_management.read import ReadFileTool from langchain.tools.file_management.write import WriteFileTool from langchain.tools.human.tool import HumanInputRun -from swarms.tools.main import process_csv, WebpageQATool +from swarms.agents.tools.main import process_csv, WebpageQATool from langchain.experimental.autonomous_agents.autogpt.agent import AutoGPT from langchain.chat_models import ChatOpenAI diff --git a/swarms/agents/utils/agent_creator.py b/swarms/agents/utils/agent_creator.py index bc850822..6a4d2c4d 100644 --- a/swarms/agents/utils/agent_creator.py +++ b/swarms/agents/utils/agent_creator.py @@ -6,7 +6,7 @@ from langchain.agents.agent import AgentExecutor from langchain.callbacks.manager import CallbackManager from langchain.chains.conversation.memory import ConversationBufferMemory from langchain.memory.chat_memory import BaseChatMemory -from swarms.tools.main import BaseToolSet, ToolsFactory +from swarms.agents.tools.main import BaseToolSet, ToolsFactory from swarms.prompts.prompts import EVAL_PREFIX, EVAL_SUFFIX from swarms.agents.utils.agent_setup import AgentSetup diff --git a/swarms/agents/utils/agent_setup.py b/swarms/agents/utils/agent_setup.py index 15669169..b0116ea8 100644 --- a/swarms/agents/utils/agent_setup.py +++ b/swarms/agents/utils/agent_setup.py @@ -1,8 +1,8 @@ import os from swarms.prompts.prompts import EVAL_PREFIX, EVAL_SUFFIX -from swarms.tools.main import BaseToolSet -from swarms.tools.main import ToolsFactory +from swarms.agents.tools.main import BaseToolSet +from swarms.agents.tools.main import ToolsFactory from langchain.chat_models.base import BaseChatModel diff --git a/swarms/agents/workers/WorkerNode.py b/swarms/agents/workers/WorkerNode.py index 3cec4266..d83d8092 100644 --- a/swarms/agents/workers/WorkerNode.py +++ b/swarms/agents/workers/WorkerNode.py @@ -1,4 +1,4 @@ -from swarms.tools.agent_tools import * +from swarms.agents.tools.agent_tools import * from langchain.tools import BaseTool from typing import Optional, Type @@ -13,7 +13,7 @@ import logging from pydantic import BaseModel, Extra logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') -from swarms.tools.main import Terminal +from swarms.agents.tools.main import Terminal class WorkerNode: """Useful for when you need to spawn an autonomous agent instance as a worker to accomplish complex tasks, it can search the internet or spawn child multi-modality models to process and generate images and text or audio and so on""" diff --git a/swarms/agents/workers/worker_agent_ultra.py b/swarms/agents/workers/worker_agent_ultra.py index 1e4ee56c..7142dda2 100644 --- a/swarms/agents/workers/worker_agent_ultra.py +++ b/swarms/agents/workers/worker_agent_ultra.py @@ -7,7 +7,7 @@ from langchain.callbacks.manager import ( ) -from swarms.tools.agent_tools import * +from swarms.agents.tools.agent_tools import * from typing import List, Any, Dict, Optional from langchain.memory.chat_message_histories import FileChatMessageHistory @@ -21,9 +21,9 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %( from typing import List, Any, Dict, Optional from langchain.memory.chat_message_histories import FileChatMessageHistory from swarms.utils.main import BaseHandler, FileHandler, FileType -from swarms.tools.main import ExitConversation, RequestsGet, CodeEditor, Terminal +from swarms.agents.tools.main import ExitConversation, RequestsGet, CodeEditor, Terminal from swarms.utils.main import CsvToDataframe -from swarms.tools.main import BaseToolSet +from swarms.agents.tools.main import BaseToolSet from swarms.utils.main import StaticUploader @@ -112,8 +112,8 @@ class WorkerUltraNodeInitializer: if os.environ.get("USE_GPU", False): import torch - from swarms.tools.main import ImageCaptioning - from swarms.tools.main import ImageEditing, InstructPix2Pix, Text2Image, VisualQuestionAnswering + from swarms.agents.tools.main import ImageCaptioning + from swarms.agents.tools.main import ImageEditing, InstructPix2Pix, Text2Image, VisualQuestionAnswering if torch.cuda.is_available(): toolsets.extend( diff --git a/swarms/agents/workers/worker_ultra_node.py b/swarms/agents/workers/worker_ultra_node.py index c9331bba..c6c07390 100644 --- a/swarms/agents/workers/worker_ultra_node.py +++ b/swarms/agents/workers/worker_ultra_node.py @@ -6,9 +6,9 @@ from typing import Dict, List from swarms.agents.utils.agent_creator import AgentCreator from swarms.utils.main import BaseHandler, FileHandler, FileType -from swarms.tools.main import ExitConversation, RequestsGet, CodeEditor, Terminal +from swarms.agents.tools.main import ExitConversation, RequestsGet, CodeEditor, Terminal from swarms.utils.main import CsvToDataframe -from swarms.tools.main import BaseToolSet +from swarms.agents.tools.main import BaseToolSet from swarms.utils.main import StaticUploader logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') @@ -45,8 +45,8 @@ class WorkerUltraNode: if os.environ.get("USE_GPU", False): import torch - from swarms.tools.main import ImageCaptioning - from swarms.tools.main import ImageEditing, InstructPix2Pix, Text2Image, VisualQuestionAnswering + from swarms.agents.tools.main import ImageCaptioning + from swarms.agents.tools.main import ImageEditing, InstructPix2Pix, Text2Image, VisualQuestionAnswering if torch.cuda.is_available(): toolsets.extend( diff --git a/swarms/hivemind.py b/swarms/hivemind.py index c552a226..66b87782 100644 --- a/swarms/hivemind.py +++ b/swarms/hivemind.py @@ -7,7 +7,7 @@ import logging from swarms.swarms import Swarms #this needs to change, we need to specify exactly what needs to be imported -from swarms.tools.agent_tools import * +from swarms.agents.tools.agent_tools import * logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/swarms/swarms.py b/swarms/swarms.py index eb4e0c87..34d99e49 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -1,7 +1,8 @@ import logging import asyncio -from swarms.tools.agent_tools import * +# from swarms.agents.tools.agent_tools import * +from swarms.agents.tools.agent_tools import * from swarms.agents.workers.WorkerNode import WorkerNode, worker_node from swarms.agents.boss.BossNode import BossNodeInitializer as BossNode from swarms.agents.workers.worker_ultra_node import WorkerUltra