From 0d835708c545ce36f3bf942c22248d0c2f232a7d Mon Sep 17 00:00:00 2001 From: Kye Date: Sun, 30 Jul 2023 15:59:30 -0400 Subject: [PATCH] clean up more modularization Former-commit-id: 972c307e55dcaec685a0038da0afa4f86ff56e05 --- api/app.py | 2 +- example.py | 2 +- playground/worker_ultra.py | 2 +- swarms/__init__.py | 2 +- swarms/{ => orchestrator}/orchestrate.py | 0 swarms/{ => swarms}/hivemind.py | 2 +- swarms/{ => swarms}/swarms.py | 0 tests/orchestrate.py | 2 +- tests/swarms.py | 2 +- 9 files changed, 7 insertions(+), 7 deletions(-) rename swarms/{ => orchestrator}/orchestrate.py (100%) rename swarms/{ => swarms}/hivemind.py (98%) rename swarms/{ => swarms}/swarms.py (100%) diff --git a/api/app.py b/api/app.py index b4b7bc14..9b58bb8f 100644 --- a/api/app.py +++ b/api/app.py @@ -9,7 +9,7 @@ from fastapi_cache.backends.redis import RedisBackend from aioredis import Redis from pydantic import BaseModel -from swarms.swarms import swarm +from swarms.swarms.swarms import swarm from fastapi_limiter import FastAPILimiter from fastapi_limiter.depends import RateLimiter diff --git a/example.py b/example.py index 89b387d5..c1b22c81 100644 --- a/example.py +++ b/example.py @@ -1,5 +1,5 @@ import os -from swarms.swarms import HierarchicalSwarm +from swarms.swarms.swarms import HierarchicalSwarm api_key = os.getenv("OPENAI_API_KEY") diff --git a/playground/worker_ultra.py b/playground/worker_ultra.py index d4ad3cf0..7d2b4e73 100644 --- a/playground/worker_ultra.py +++ b/playground/worker_ultra.py @@ -1,5 +1,5 @@ import os -from swarms.swarms import WorkerUltra +from swarms.swarms.swarms import WorkerUltra api_key = os.getenv("OPENAI_API_KEY") diff --git a/swarms/__init__.py b/swarms/__init__.py index 93e1d276..6af7aba1 100644 --- a/swarms/__init__.py +++ b/swarms/__init__.py @@ -1,4 +1,4 @@ -from swarms.swarms import HierarchicalSwarm, swarm +from swarms.swarms.swarms import HierarchicalSwarm, swarm from swarms.workers.worker_node import WorkerNodeInitializer, WorkerNode, worker_node from swarms.boss.boss_node import BossNodeInitializer, BossNode diff --git a/swarms/orchestrate.py b/swarms/orchestrator/orchestrate.py similarity index 100% rename from swarms/orchestrate.py rename to swarms/orchestrator/orchestrate.py diff --git a/swarms/hivemind.py b/swarms/swarms/hivemind.py similarity index 98% rename from swarms/hivemind.py rename to swarms/swarms/hivemind.py index 67925632..ee5e3aac 100644 --- a/swarms/hivemind.py +++ b/swarms/swarms/hivemind.py @@ -6,7 +6,7 @@ import logging #this needs to change, we need to specify exactly what needs to be imported from swarms.agents.tools.agent_tools import * -from swarms.swarms import HierarchicalSwarm +from swarms.swarms.swarms import HierarchicalSwarm logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/swarms/swarms.py b/swarms/swarms/swarms.py similarity index 100% rename from swarms/swarms.py rename to swarms/swarms/swarms.py diff --git a/tests/orchestrate.py b/tests/orchestrate.py index 86395a57..fadc85ab 100644 --- a/tests/orchestrate.py +++ b/tests/orchestrate.py @@ -1,6 +1,6 @@ import pytest from unittest.mock import Mock -from swarms.orchestrate import Orchestrator +from swarms.orchestrator.orchestrate import Orchestrator @pytest.fixture diff --git a/tests/swarms.py b/tests/swarms.py index b740e732..e523d6ea 100644 --- a/tests/swarms.py +++ b/tests/swarms.py @@ -1,7 +1,7 @@ import pytest import logging from unittest.mock import patch -from swarms.swarms import HierarchicalSwarm # replace with your actual module name +from swarms.swarms.swarms import HierarchicalSwarm # replace with your actual module name @pytest.fixture def swarm():