From 34ef795b7246ceb1cec114d992aa22fc9e6c42b0 Mon Sep 17 00:00:00 2001 From: Kye Date: Tue, 3 Oct 2023 13:39:36 -0400 Subject: [PATCH] code quality clean up --- pyproject.toml | 2 +- swarms/agents/agent.py | 5 +- swarms/agents/base.py | 0 .../models/GroundingDINO/.asset/COCO.png | Bin .../models/GroundingDINO/.asset/GD_GLIGEN.png | Bin .../models/GroundingDINO/.asset/GD_SD.png | Bin .../models/GroundingDINO/.asset/ODinW.png | Bin .../models/GroundingDINO/.asset/arch.png | Bin .../models/GroundingDINO/.asset/cat_dog.jpeg | Bin .../models/GroundingDINO/.asset/cats.png | Bin .../.asset/grounding_dino_logo.png | Bin .../GroundingDINO/.asset/hero_figure.png | Bin .../GroundingDINO/.asset/model_explan1.PNG | Bin .../GroundingDINO/.asset/model_explan2.PNG | Bin .../models/GroundingDINO/.gitignore | 0 .../models/GroundingDINO/LICENSE | 0 .../models/GroundingDINO/README.md | 0 .../models/GroundingDINO/__init__.py | 0 .../GroundingDINO/demo/create_coco_dataset.py | 0 .../models/GroundingDINO/demo/gradio_app.py | 0 ...ge_editing_with_groundingdino_gligen.ipynb | 0 ...g_with_groundingdino_stablediffusion.ipynb | 0 .../demo/inference_on_a_image.py | 0 .../GroundingDINO/demo/test_ap_on_coco.py | 0 .../GroundingDINO/groundingdino/__init__.py | 0 .../config/GroundingDINO_SwinB_cfg.py | 0 .../config/GroundingDINO_SwinT_OGC.py | 0 .../groundingdino/config/__init__.py | 0 .../groundingdino/datasets/__init__.py | 0 .../datasets/cocogrounding_eval.py | 0 .../groundingdino/datasets/transforms.py | 0 .../models/GroundingDINO/__init__.py | 0 .../models/GroundingDINO/backbone/__init__.py | 0 .../models/GroundingDINO/backbone/backbone.py | 0 .../backbone/position_encoding.py | 0 .../backbone/swin_transformer.py | 0 .../models/GroundingDINO/bertwarper.py | 0 .../csrc/MsDeformAttn/ms_deform_attn.h | 0 .../csrc/MsDeformAttn/ms_deform_attn_cpu.cpp | 0 .../csrc/MsDeformAttn/ms_deform_attn_cpu.h | 0 .../csrc/MsDeformAttn/ms_deform_attn_cuda.cu | 0 .../csrc/MsDeformAttn/ms_deform_attn_cuda.h | 0 .../MsDeformAttn/ms_deform_im2col_cuda.cuh | 0 .../models/GroundingDINO/csrc/cuda_version.cu | 0 .../models/GroundingDINO/csrc/vision.cpp | 0 .../models/GroundingDINO/fuse_modules.py | 0 .../models/GroundingDINO/groundingdino.py | 0 .../models/GroundingDINO/ms_deform_attn.py | 0 .../models/GroundingDINO/transformer.py | 0 .../GroundingDINO/transformer_vanilla.py | 0 .../models/GroundingDINO/utils.py | 0 .../groundingdino/models/__init__.py | 0 .../groundingdino/models/registry.py | 0 .../groundingdino/util/__init__.py | 0 .../groundingdino/util/box_ops.py | 0 .../groundingdino/util/get_tokenlizer.py | 0 .../groundingdino/util/inference.py | 0 .../groundingdino/util/logger.py | 0 .../GroundingDINO/groundingdino/util/misc.py | 0 .../groundingdino/util/slconfig.py | 0 .../GroundingDINO/groundingdino/util/slio.py | 0 .../groundingdino/util/time_counter.py | 0 .../GroundingDINO/groundingdino/util/utils.py | 0 .../groundingdino/util/visualizer.py | 0 .../groundingdino/util/vl_utils.py | 0 .../models/GroundingDINO/requirements.txt | 0 .../models/GroundingDINO/setup.py | 0 swarms/{workers => agents}/models/__init__.py | 0 .../models/segment_anything/.flake8 | 0 .../models/segment_anything/.gitignore | 0 .../segment_anything/CODE_OF_CONDUCT.md | 0 .../models/segment_anything/CONTRIBUTING.md | 0 .../models/segment_anything/LICENSE | 0 .../models/segment_anything/README.md | 0 .../models/segment_anything/__init__.py | 0 .../models/segment_anything/assets/masks1.png | Bin .../models/segment_anything/assets/masks2.jpg | Bin .../segment_anything/assets/minidemo.gif | Bin .../segment_anything/assets/model_diagram.png | Bin .../segment_anything/assets/notebook1.png | Bin .../segment_anything/assets/notebook2.png | Bin .../models/segment_anything/demo/README.md | 0 .../demo/configs/webpack/common.js | 0 .../demo/configs/webpack/dev.js | 0 .../demo/configs/webpack/prod.js | 0 .../models/segment_anything/demo/package.json | 0 .../segment_anything/demo/postcss.config.js | 0 .../models/segment_anything/demo/src/App.tsx | 0 .../demo/src/assets/data/dogs.jpg | Bin .../demo/src/assets/index.html | 0 .../demo/src/assets/scss/App.scss | 0 .../demo/src/components/Stage.tsx | 0 .../demo/src/components/Tool.tsx | 0 .../src/components/helpers/Interfaces.tsx | 0 .../demo/src/components/helpers/maskUtils.tsx | 0 .../src/components/helpers/onnxModelAPI.tsx | 0 .../src/components/helpers/scaleHelper.tsx | 0 .../demo/src/components/hooks/context.tsx | 0 .../src/components/hooks/createContext.tsx | 0 .../segment_anything/demo/src/index.tsx | 0 .../segment_anything/demo/tailwind.config.js | 0 .../segment_anything/demo/tsconfig.json | 0 .../models/segment_anything/linter.sh | 0 .../automatic_mask_generator_example.ipynb | 0 .../segment_anything/notebooks/images/dog.jpg | Bin .../notebooks/images/groceries.jpg | Bin .../notebooks/images/truck.jpg | Bin .../notebooks/onnx_model_example.ipynb | 0 .../notebooks/predictor_example.ipynb | 0 .../models/segment_anything/scripts/amg.py | 0 .../scripts/export_onnx_model.py | 0 .../segment_anything/__init__.py | 0 .../automatic_mask_generator.py | 0 .../segment_anything/build_sam.py | 0 .../segment_anything/modeling/__init__.py | 0 .../segment_anything/modeling/common.py | 0 .../modeling/image_encoder.py | 0 .../segment_anything/modeling/mask_decoder.py | 0 .../modeling/prompt_encoder.py | 0 .../segment_anything/modeling/sam.py | 0 .../segment_anything/modeling/transformer.py | 0 .../segment_anything/predictor.py | 0 .../segment_anything/utils/__init__.py | 0 .../segment_anything/utils/amg.py | 0 .../segment_anything/utils/onnx.py | 0 .../segment_anything/utils/transforms.py | 0 .../models/segment_anything/setup.cfg | 0 .../models/segment_anything/setup.py | 0 swarms/agents/multi_modal_agent.py | 2 +- .../multi_modal_workers/__init__.py | 0 .../multi_modal_workers/multi_modal_agent.py | 44 +++++++++++------- .../omni_agent/__init__.py | 0 .../multi_modal_workers/omni_agent/config.yml | 0 .../omni_agent/get_token_ids.py | 0 .../omni_agent/model_server.py | 0 .../omni_agent/omni_chat.py | 0 swarms/agents/omni_modal_agent.py | 2 +- swarms/swarms/multi_agent_debate.py | 5 ++ 138 files changed, 38 insertions(+), 22 deletions(-) delete mode 100644 swarms/agents/base.py rename swarms/{workers => agents}/models/GroundingDINO/.asset/COCO.png (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/GD_GLIGEN.png (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/GD_SD.png (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/ODinW.png (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/arch.png (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/cat_dog.jpeg (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/cats.png (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/grounding_dino_logo.png (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/hero_figure.png (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/model_explan1.PNG (100%) rename swarms/{workers => agents}/models/GroundingDINO/.asset/model_explan2.PNG (100%) rename swarms/{workers => agents}/models/GroundingDINO/.gitignore (100%) rename swarms/{workers => agents}/models/GroundingDINO/LICENSE (100%) rename swarms/{workers => agents}/models/GroundingDINO/README.md (100%) rename swarms/{workers => agents}/models/GroundingDINO/__init__.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/demo/create_coco_dataset.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/demo/gradio_app.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/demo/image_editing_with_groundingdino_gligen.ipynb (100%) rename swarms/{workers => agents}/models/GroundingDINO/demo/image_editing_with_groundingdino_stablediffusion.ipynb (100%) rename swarms/{workers => agents}/models/GroundingDINO/demo/inference_on_a_image.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/demo/test_ap_on_coco.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/__init__.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinB_cfg.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/config/__init__.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/datasets/__init__.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/datasets/cocogrounding_eval.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/datasets/transforms.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/__init__.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/__init__.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/backbone.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/position_encoding.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/swin_transformer.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/bertwarper.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.cpp (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.h (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.h (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_im2col_cuda.cuh (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/cuda_version.cu (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/fuse_modules.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/groundingdino.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer_vanilla.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/GroundingDINO/utils.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/__init__.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/models/registry.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/__init__.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/box_ops.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/get_tokenlizer.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/inference.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/logger.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/misc.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/slconfig.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/slio.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/time_counter.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/utils.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/visualizer.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/groundingdino/util/vl_utils.py (100%) rename swarms/{workers => agents}/models/GroundingDINO/requirements.txt (100%) rename swarms/{workers => agents}/models/GroundingDINO/setup.py (100%) rename swarms/{workers => agents}/models/__init__.py (100%) rename swarms/{workers => agents}/models/segment_anything/.flake8 (100%) rename swarms/{workers => agents}/models/segment_anything/.gitignore (100%) rename swarms/{workers => agents}/models/segment_anything/CODE_OF_CONDUCT.md (100%) rename swarms/{workers => agents}/models/segment_anything/CONTRIBUTING.md (100%) rename swarms/{workers => agents}/models/segment_anything/LICENSE (100%) rename swarms/{workers => agents}/models/segment_anything/README.md (100%) rename swarms/{workers => agents}/models/segment_anything/__init__.py (100%) rename swarms/{workers => agents}/models/segment_anything/assets/masks1.png (100%) rename swarms/{workers => agents}/models/segment_anything/assets/masks2.jpg (100%) rename swarms/{workers => agents}/models/segment_anything/assets/minidemo.gif (100%) rename swarms/{workers => agents}/models/segment_anything/assets/model_diagram.png (100%) rename swarms/{workers => agents}/models/segment_anything/assets/notebook1.png (100%) rename swarms/{workers => agents}/models/segment_anything/assets/notebook2.png (100%) rename swarms/{workers => agents}/models/segment_anything/demo/README.md (100%) rename swarms/{workers => agents}/models/segment_anything/demo/configs/webpack/common.js (100%) rename swarms/{workers => agents}/models/segment_anything/demo/configs/webpack/dev.js (100%) rename swarms/{workers => agents}/models/segment_anything/demo/configs/webpack/prod.js (100%) rename swarms/{workers => agents}/models/segment_anything/demo/package.json (100%) rename swarms/{workers => agents}/models/segment_anything/demo/postcss.config.js (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/App.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/assets/data/dogs.jpg (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/assets/index.html (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/assets/scss/App.scss (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/components/Stage.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/components/Tool.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/components/helpers/Interfaces.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/components/helpers/maskUtils.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/components/helpers/onnxModelAPI.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/components/helpers/scaleHelper.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/components/hooks/context.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/components/hooks/createContext.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/src/index.tsx (100%) rename swarms/{workers => agents}/models/segment_anything/demo/tailwind.config.js (100%) rename swarms/{workers => agents}/models/segment_anything/demo/tsconfig.json (100%) rename swarms/{workers => agents}/models/segment_anything/linter.sh (100%) rename swarms/{workers => agents}/models/segment_anything/notebooks/automatic_mask_generator_example.ipynb (100%) rename swarms/{workers => agents}/models/segment_anything/notebooks/images/dog.jpg (100%) rename swarms/{workers => agents}/models/segment_anything/notebooks/images/groceries.jpg (100%) rename swarms/{workers => agents}/models/segment_anything/notebooks/images/truck.jpg (100%) rename swarms/{workers => agents}/models/segment_anything/notebooks/onnx_model_example.ipynb (100%) rename swarms/{workers => agents}/models/segment_anything/notebooks/predictor_example.ipynb (100%) rename swarms/{workers => agents}/models/segment_anything/scripts/amg.py (100%) rename swarms/{workers => agents}/models/segment_anything/scripts/export_onnx_model.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/__init__.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/automatic_mask_generator.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/build_sam.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/modeling/__init__.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/modeling/common.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/modeling/image_encoder.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/modeling/mask_decoder.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/modeling/prompt_encoder.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/modeling/sam.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/modeling/transformer.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/predictor.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/utils/__init__.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/utils/amg.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/utils/onnx.py (100%) rename swarms/{workers => agents}/models/segment_anything/segment_anything/utils/transforms.py (100%) rename swarms/{workers => agents}/models/segment_anything/setup.cfg (100%) rename swarms/{workers => agents}/models/segment_anything/setup.py (100%) rename swarms/{workers => agents}/multi_modal_workers/__init__.py (100%) rename swarms/{workers => agents}/multi_modal_workers/multi_modal_agent.py (98%) rename swarms/{workers => agents}/multi_modal_workers/omni_agent/__init__.py (100%) rename swarms/{workers => agents}/multi_modal_workers/omni_agent/config.yml (100%) rename swarms/{workers => agents}/multi_modal_workers/omni_agent/get_token_ids.py (100%) rename swarms/{workers => agents}/multi_modal_workers/omni_agent/model_server.py (100%) rename swarms/{workers => agents}/multi_modal_workers/omni_agent/omni_chat.py (100%) diff --git a/pyproject.toml b/pyproject.toml index b43df14a..9f254890 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "1.7.1" +version = "1.7.2" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/swarms/agents/agent.py b/swarms/agents/agent.py index 5bda38e5..2fd25cd1 100644 --- a/swarms/agents/agent.py +++ b/swarms/agents/agent.py @@ -6,7 +6,6 @@ from langchain.chains.llm import LLMChain from swarms.agents.utils.Agent import AgentOutputParser from swarms.agents.utils.human_input import HumanInputRun -from swarms.memory.base import VectorStoreRetriever from swarms.memory.base_memory import BaseChatMessageHistory, ChatMessageHistory from swarms.memory.document import Document from swarms.models.base import AbstractModel @@ -29,7 +28,7 @@ class Agent: self, ai_name: str, chain: LLMChain, - memory: VectorStoreRetriever, + memory, output_parser: AgentOutputParser, tools: List[BaseTool], feedback_tool: Optional[HumanInputRun] = None, @@ -49,7 +48,7 @@ class Agent: cls, ai_name: str, ai_role: str, - memory: VectorStoreRetriever, + memory, tools: List[BaseTool], llm: AbstractModel, human_in_the_loop: bool = False, diff --git a/swarms/agents/base.py b/swarms/agents/base.py deleted file mode 100644 index e69de29b..00000000 diff --git a/swarms/workers/models/GroundingDINO/.asset/COCO.png b/swarms/agents/models/GroundingDINO/.asset/COCO.png similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/COCO.png rename to swarms/agents/models/GroundingDINO/.asset/COCO.png diff --git a/swarms/workers/models/GroundingDINO/.asset/GD_GLIGEN.png b/swarms/agents/models/GroundingDINO/.asset/GD_GLIGEN.png similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/GD_GLIGEN.png rename to swarms/agents/models/GroundingDINO/.asset/GD_GLIGEN.png diff --git a/swarms/workers/models/GroundingDINO/.asset/GD_SD.png b/swarms/agents/models/GroundingDINO/.asset/GD_SD.png similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/GD_SD.png rename to swarms/agents/models/GroundingDINO/.asset/GD_SD.png diff --git a/swarms/workers/models/GroundingDINO/.asset/ODinW.png b/swarms/agents/models/GroundingDINO/.asset/ODinW.png similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/ODinW.png rename to swarms/agents/models/GroundingDINO/.asset/ODinW.png diff --git a/swarms/workers/models/GroundingDINO/.asset/arch.png b/swarms/agents/models/GroundingDINO/.asset/arch.png similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/arch.png rename to swarms/agents/models/GroundingDINO/.asset/arch.png diff --git a/swarms/workers/models/GroundingDINO/.asset/cat_dog.jpeg b/swarms/agents/models/GroundingDINO/.asset/cat_dog.jpeg similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/cat_dog.jpeg rename to swarms/agents/models/GroundingDINO/.asset/cat_dog.jpeg diff --git a/swarms/workers/models/GroundingDINO/.asset/cats.png b/swarms/agents/models/GroundingDINO/.asset/cats.png similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/cats.png rename to swarms/agents/models/GroundingDINO/.asset/cats.png diff --git a/swarms/workers/models/GroundingDINO/.asset/grounding_dino_logo.png b/swarms/agents/models/GroundingDINO/.asset/grounding_dino_logo.png similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/grounding_dino_logo.png rename to swarms/agents/models/GroundingDINO/.asset/grounding_dino_logo.png diff --git a/swarms/workers/models/GroundingDINO/.asset/hero_figure.png b/swarms/agents/models/GroundingDINO/.asset/hero_figure.png similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/hero_figure.png rename to swarms/agents/models/GroundingDINO/.asset/hero_figure.png diff --git a/swarms/workers/models/GroundingDINO/.asset/model_explan1.PNG b/swarms/agents/models/GroundingDINO/.asset/model_explan1.PNG similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/model_explan1.PNG rename to swarms/agents/models/GroundingDINO/.asset/model_explan1.PNG diff --git a/swarms/workers/models/GroundingDINO/.asset/model_explan2.PNG b/swarms/agents/models/GroundingDINO/.asset/model_explan2.PNG similarity index 100% rename from swarms/workers/models/GroundingDINO/.asset/model_explan2.PNG rename to swarms/agents/models/GroundingDINO/.asset/model_explan2.PNG diff --git a/swarms/workers/models/GroundingDINO/.gitignore b/swarms/agents/models/GroundingDINO/.gitignore similarity index 100% rename from swarms/workers/models/GroundingDINO/.gitignore rename to swarms/agents/models/GroundingDINO/.gitignore diff --git a/swarms/workers/models/GroundingDINO/LICENSE b/swarms/agents/models/GroundingDINO/LICENSE similarity index 100% rename from swarms/workers/models/GroundingDINO/LICENSE rename to swarms/agents/models/GroundingDINO/LICENSE diff --git a/swarms/workers/models/GroundingDINO/README.md b/swarms/agents/models/GroundingDINO/README.md similarity index 100% rename from swarms/workers/models/GroundingDINO/README.md rename to swarms/agents/models/GroundingDINO/README.md diff --git a/swarms/workers/models/GroundingDINO/__init__.py b/swarms/agents/models/GroundingDINO/__init__.py similarity index 100% rename from swarms/workers/models/GroundingDINO/__init__.py rename to swarms/agents/models/GroundingDINO/__init__.py diff --git a/swarms/workers/models/GroundingDINO/demo/create_coco_dataset.py b/swarms/agents/models/GroundingDINO/demo/create_coco_dataset.py similarity index 100% rename from swarms/workers/models/GroundingDINO/demo/create_coco_dataset.py rename to swarms/agents/models/GroundingDINO/demo/create_coco_dataset.py diff --git a/swarms/workers/models/GroundingDINO/demo/gradio_app.py b/swarms/agents/models/GroundingDINO/demo/gradio_app.py similarity index 100% rename from swarms/workers/models/GroundingDINO/demo/gradio_app.py rename to swarms/agents/models/GroundingDINO/demo/gradio_app.py diff --git a/swarms/workers/models/GroundingDINO/demo/image_editing_with_groundingdino_gligen.ipynb b/swarms/agents/models/GroundingDINO/demo/image_editing_with_groundingdino_gligen.ipynb similarity index 100% rename from swarms/workers/models/GroundingDINO/demo/image_editing_with_groundingdino_gligen.ipynb rename to swarms/agents/models/GroundingDINO/demo/image_editing_with_groundingdino_gligen.ipynb diff --git a/swarms/workers/models/GroundingDINO/demo/image_editing_with_groundingdino_stablediffusion.ipynb b/swarms/agents/models/GroundingDINO/demo/image_editing_with_groundingdino_stablediffusion.ipynb similarity index 100% rename from swarms/workers/models/GroundingDINO/demo/image_editing_with_groundingdino_stablediffusion.ipynb rename to swarms/agents/models/GroundingDINO/demo/image_editing_with_groundingdino_stablediffusion.ipynb diff --git a/swarms/workers/models/GroundingDINO/demo/inference_on_a_image.py b/swarms/agents/models/GroundingDINO/demo/inference_on_a_image.py similarity index 100% rename from swarms/workers/models/GroundingDINO/demo/inference_on_a_image.py rename to swarms/agents/models/GroundingDINO/demo/inference_on_a_image.py diff --git a/swarms/workers/models/GroundingDINO/demo/test_ap_on_coco.py b/swarms/agents/models/GroundingDINO/demo/test_ap_on_coco.py similarity index 100% rename from swarms/workers/models/GroundingDINO/demo/test_ap_on_coco.py rename to swarms/agents/models/GroundingDINO/demo/test_ap_on_coco.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/__init__.py b/swarms/agents/models/GroundingDINO/groundingdino/__init__.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/__init__.py rename to swarms/agents/models/GroundingDINO/groundingdino/__init__.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinB_cfg.py b/swarms/agents/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinB_cfg.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinB_cfg.py rename to swarms/agents/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinB_cfg.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py b/swarms/agents/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py rename to swarms/agents/models/GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/config/__init__.py b/swarms/agents/models/GroundingDINO/groundingdino/config/__init__.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/config/__init__.py rename to swarms/agents/models/GroundingDINO/groundingdino/config/__init__.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/datasets/__init__.py b/swarms/agents/models/GroundingDINO/groundingdino/datasets/__init__.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/datasets/__init__.py rename to swarms/agents/models/GroundingDINO/groundingdino/datasets/__init__.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/datasets/cocogrounding_eval.py b/swarms/agents/models/GroundingDINO/groundingdino/datasets/cocogrounding_eval.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/datasets/cocogrounding_eval.py rename to swarms/agents/models/GroundingDINO/groundingdino/datasets/cocogrounding_eval.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/datasets/transforms.py b/swarms/agents/models/GroundingDINO/groundingdino/datasets/transforms.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/datasets/transforms.py rename to swarms/agents/models/GroundingDINO/groundingdino/datasets/transforms.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/__init__.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/__init__.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/__init__.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/__init__.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/__init__.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/__init__.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/__init__.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/__init__.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/backbone.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/backbone.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/backbone.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/backbone.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/position_encoding.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/position_encoding.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/position_encoding.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/position_encoding.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/swin_transformer.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/swin_transformer.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/swin_transformer.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/backbone/swin_transformer.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/bertwarper.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/bertwarper.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/bertwarper.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/bertwarper.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn.h diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.cpp b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.cpp similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.cpp rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.cpp diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.h b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.h similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.h rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cpu.h diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.cu diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.h b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.h similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.h rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_attn_cuda.h diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_im2col_cuda.cuh b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_im2col_cuda.cuh similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_im2col_cuda.cuh rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/MsDeformAttn/ms_deform_im2col_cuda.cuh diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/cuda_version.cu b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/cuda_version.cu similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/cuda_version.cu rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/cuda_version.cu diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/csrc/vision.cpp diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/fuse_modules.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/fuse_modules.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/fuse_modules.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/fuse_modules.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/groundingdino.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/groundingdino.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/groundingdino.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/groundingdino.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/ms_deform_attn.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer_vanilla.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer_vanilla.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer_vanilla.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/transformer_vanilla.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/utils.py b/swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/utils.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/GroundingDINO/utils.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/GroundingDINO/utils.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/__init__.py b/swarms/agents/models/GroundingDINO/groundingdino/models/__init__.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/__init__.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/__init__.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/models/registry.py b/swarms/agents/models/GroundingDINO/groundingdino/models/registry.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/models/registry.py rename to swarms/agents/models/GroundingDINO/groundingdino/models/registry.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/__init__.py b/swarms/agents/models/GroundingDINO/groundingdino/util/__init__.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/__init__.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/__init__.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/box_ops.py b/swarms/agents/models/GroundingDINO/groundingdino/util/box_ops.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/box_ops.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/box_ops.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/get_tokenlizer.py b/swarms/agents/models/GroundingDINO/groundingdino/util/get_tokenlizer.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/get_tokenlizer.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/get_tokenlizer.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/inference.py b/swarms/agents/models/GroundingDINO/groundingdino/util/inference.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/inference.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/inference.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/logger.py b/swarms/agents/models/GroundingDINO/groundingdino/util/logger.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/logger.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/logger.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/misc.py b/swarms/agents/models/GroundingDINO/groundingdino/util/misc.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/misc.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/misc.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/slconfig.py b/swarms/agents/models/GroundingDINO/groundingdino/util/slconfig.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/slconfig.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/slconfig.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/slio.py b/swarms/agents/models/GroundingDINO/groundingdino/util/slio.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/slio.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/slio.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/time_counter.py b/swarms/agents/models/GroundingDINO/groundingdino/util/time_counter.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/time_counter.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/time_counter.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/utils.py b/swarms/agents/models/GroundingDINO/groundingdino/util/utils.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/utils.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/utils.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/visualizer.py b/swarms/agents/models/GroundingDINO/groundingdino/util/visualizer.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/visualizer.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/visualizer.py diff --git a/swarms/workers/models/GroundingDINO/groundingdino/util/vl_utils.py b/swarms/agents/models/GroundingDINO/groundingdino/util/vl_utils.py similarity index 100% rename from swarms/workers/models/GroundingDINO/groundingdino/util/vl_utils.py rename to swarms/agents/models/GroundingDINO/groundingdino/util/vl_utils.py diff --git a/swarms/workers/models/GroundingDINO/requirements.txt b/swarms/agents/models/GroundingDINO/requirements.txt similarity index 100% rename from swarms/workers/models/GroundingDINO/requirements.txt rename to swarms/agents/models/GroundingDINO/requirements.txt diff --git a/swarms/workers/models/GroundingDINO/setup.py b/swarms/agents/models/GroundingDINO/setup.py similarity index 100% rename from swarms/workers/models/GroundingDINO/setup.py rename to swarms/agents/models/GroundingDINO/setup.py diff --git a/swarms/workers/models/__init__.py b/swarms/agents/models/__init__.py similarity index 100% rename from swarms/workers/models/__init__.py rename to swarms/agents/models/__init__.py diff --git a/swarms/workers/models/segment_anything/.flake8 b/swarms/agents/models/segment_anything/.flake8 similarity index 100% rename from swarms/workers/models/segment_anything/.flake8 rename to swarms/agents/models/segment_anything/.flake8 diff --git a/swarms/workers/models/segment_anything/.gitignore b/swarms/agents/models/segment_anything/.gitignore similarity index 100% rename from swarms/workers/models/segment_anything/.gitignore rename to swarms/agents/models/segment_anything/.gitignore diff --git a/swarms/workers/models/segment_anything/CODE_OF_CONDUCT.md b/swarms/agents/models/segment_anything/CODE_OF_CONDUCT.md similarity index 100% rename from swarms/workers/models/segment_anything/CODE_OF_CONDUCT.md rename to swarms/agents/models/segment_anything/CODE_OF_CONDUCT.md diff --git a/swarms/workers/models/segment_anything/CONTRIBUTING.md b/swarms/agents/models/segment_anything/CONTRIBUTING.md similarity index 100% rename from swarms/workers/models/segment_anything/CONTRIBUTING.md rename to swarms/agents/models/segment_anything/CONTRIBUTING.md diff --git a/swarms/workers/models/segment_anything/LICENSE b/swarms/agents/models/segment_anything/LICENSE similarity index 100% rename from swarms/workers/models/segment_anything/LICENSE rename to swarms/agents/models/segment_anything/LICENSE diff --git a/swarms/workers/models/segment_anything/README.md b/swarms/agents/models/segment_anything/README.md similarity index 100% rename from swarms/workers/models/segment_anything/README.md rename to swarms/agents/models/segment_anything/README.md diff --git a/swarms/workers/models/segment_anything/__init__.py b/swarms/agents/models/segment_anything/__init__.py similarity index 100% rename from swarms/workers/models/segment_anything/__init__.py rename to swarms/agents/models/segment_anything/__init__.py diff --git a/swarms/workers/models/segment_anything/assets/masks1.png b/swarms/agents/models/segment_anything/assets/masks1.png similarity index 100% rename from swarms/workers/models/segment_anything/assets/masks1.png rename to swarms/agents/models/segment_anything/assets/masks1.png diff --git a/swarms/workers/models/segment_anything/assets/masks2.jpg b/swarms/agents/models/segment_anything/assets/masks2.jpg similarity index 100% rename from swarms/workers/models/segment_anything/assets/masks2.jpg rename to swarms/agents/models/segment_anything/assets/masks2.jpg diff --git a/swarms/workers/models/segment_anything/assets/minidemo.gif b/swarms/agents/models/segment_anything/assets/minidemo.gif similarity index 100% rename from swarms/workers/models/segment_anything/assets/minidemo.gif rename to swarms/agents/models/segment_anything/assets/minidemo.gif diff --git a/swarms/workers/models/segment_anything/assets/model_diagram.png b/swarms/agents/models/segment_anything/assets/model_diagram.png similarity index 100% rename from swarms/workers/models/segment_anything/assets/model_diagram.png rename to swarms/agents/models/segment_anything/assets/model_diagram.png diff --git a/swarms/workers/models/segment_anything/assets/notebook1.png b/swarms/agents/models/segment_anything/assets/notebook1.png similarity index 100% rename from swarms/workers/models/segment_anything/assets/notebook1.png rename to swarms/agents/models/segment_anything/assets/notebook1.png diff --git a/swarms/workers/models/segment_anything/assets/notebook2.png b/swarms/agents/models/segment_anything/assets/notebook2.png similarity index 100% rename from swarms/workers/models/segment_anything/assets/notebook2.png rename to swarms/agents/models/segment_anything/assets/notebook2.png diff --git a/swarms/workers/models/segment_anything/demo/README.md b/swarms/agents/models/segment_anything/demo/README.md similarity index 100% rename from swarms/workers/models/segment_anything/demo/README.md rename to swarms/agents/models/segment_anything/demo/README.md diff --git a/swarms/workers/models/segment_anything/demo/configs/webpack/common.js b/swarms/agents/models/segment_anything/demo/configs/webpack/common.js similarity index 100% rename from swarms/workers/models/segment_anything/demo/configs/webpack/common.js rename to swarms/agents/models/segment_anything/demo/configs/webpack/common.js diff --git a/swarms/workers/models/segment_anything/demo/configs/webpack/dev.js b/swarms/agents/models/segment_anything/demo/configs/webpack/dev.js similarity index 100% rename from swarms/workers/models/segment_anything/demo/configs/webpack/dev.js rename to swarms/agents/models/segment_anything/demo/configs/webpack/dev.js diff --git a/swarms/workers/models/segment_anything/demo/configs/webpack/prod.js b/swarms/agents/models/segment_anything/demo/configs/webpack/prod.js similarity index 100% rename from swarms/workers/models/segment_anything/demo/configs/webpack/prod.js rename to swarms/agents/models/segment_anything/demo/configs/webpack/prod.js diff --git a/swarms/workers/models/segment_anything/demo/package.json b/swarms/agents/models/segment_anything/demo/package.json similarity index 100% rename from swarms/workers/models/segment_anything/demo/package.json rename to swarms/agents/models/segment_anything/demo/package.json diff --git a/swarms/workers/models/segment_anything/demo/postcss.config.js b/swarms/agents/models/segment_anything/demo/postcss.config.js similarity index 100% rename from swarms/workers/models/segment_anything/demo/postcss.config.js rename to swarms/agents/models/segment_anything/demo/postcss.config.js diff --git a/swarms/workers/models/segment_anything/demo/src/App.tsx b/swarms/agents/models/segment_anything/demo/src/App.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/App.tsx rename to swarms/agents/models/segment_anything/demo/src/App.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/assets/data/dogs.jpg b/swarms/agents/models/segment_anything/demo/src/assets/data/dogs.jpg similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/assets/data/dogs.jpg rename to swarms/agents/models/segment_anything/demo/src/assets/data/dogs.jpg diff --git a/swarms/workers/models/segment_anything/demo/src/assets/index.html b/swarms/agents/models/segment_anything/demo/src/assets/index.html similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/assets/index.html rename to swarms/agents/models/segment_anything/demo/src/assets/index.html diff --git a/swarms/workers/models/segment_anything/demo/src/assets/scss/App.scss b/swarms/agents/models/segment_anything/demo/src/assets/scss/App.scss similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/assets/scss/App.scss rename to swarms/agents/models/segment_anything/demo/src/assets/scss/App.scss diff --git a/swarms/workers/models/segment_anything/demo/src/components/Stage.tsx b/swarms/agents/models/segment_anything/demo/src/components/Stage.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/components/Stage.tsx rename to swarms/agents/models/segment_anything/demo/src/components/Stage.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/components/Tool.tsx b/swarms/agents/models/segment_anything/demo/src/components/Tool.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/components/Tool.tsx rename to swarms/agents/models/segment_anything/demo/src/components/Tool.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/components/helpers/Interfaces.tsx b/swarms/agents/models/segment_anything/demo/src/components/helpers/Interfaces.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/components/helpers/Interfaces.tsx rename to swarms/agents/models/segment_anything/demo/src/components/helpers/Interfaces.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/components/helpers/maskUtils.tsx b/swarms/agents/models/segment_anything/demo/src/components/helpers/maskUtils.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/components/helpers/maskUtils.tsx rename to swarms/agents/models/segment_anything/demo/src/components/helpers/maskUtils.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/components/helpers/onnxModelAPI.tsx b/swarms/agents/models/segment_anything/demo/src/components/helpers/onnxModelAPI.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/components/helpers/onnxModelAPI.tsx rename to swarms/agents/models/segment_anything/demo/src/components/helpers/onnxModelAPI.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/components/helpers/scaleHelper.tsx b/swarms/agents/models/segment_anything/demo/src/components/helpers/scaleHelper.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/components/helpers/scaleHelper.tsx rename to swarms/agents/models/segment_anything/demo/src/components/helpers/scaleHelper.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/components/hooks/context.tsx b/swarms/agents/models/segment_anything/demo/src/components/hooks/context.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/components/hooks/context.tsx rename to swarms/agents/models/segment_anything/demo/src/components/hooks/context.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/components/hooks/createContext.tsx b/swarms/agents/models/segment_anything/demo/src/components/hooks/createContext.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/components/hooks/createContext.tsx rename to swarms/agents/models/segment_anything/demo/src/components/hooks/createContext.tsx diff --git a/swarms/workers/models/segment_anything/demo/src/index.tsx b/swarms/agents/models/segment_anything/demo/src/index.tsx similarity index 100% rename from swarms/workers/models/segment_anything/demo/src/index.tsx rename to swarms/agents/models/segment_anything/demo/src/index.tsx diff --git a/swarms/workers/models/segment_anything/demo/tailwind.config.js b/swarms/agents/models/segment_anything/demo/tailwind.config.js similarity index 100% rename from swarms/workers/models/segment_anything/demo/tailwind.config.js rename to swarms/agents/models/segment_anything/demo/tailwind.config.js diff --git a/swarms/workers/models/segment_anything/demo/tsconfig.json b/swarms/agents/models/segment_anything/demo/tsconfig.json similarity index 100% rename from swarms/workers/models/segment_anything/demo/tsconfig.json rename to swarms/agents/models/segment_anything/demo/tsconfig.json diff --git a/swarms/workers/models/segment_anything/linter.sh b/swarms/agents/models/segment_anything/linter.sh similarity index 100% rename from swarms/workers/models/segment_anything/linter.sh rename to swarms/agents/models/segment_anything/linter.sh diff --git a/swarms/workers/models/segment_anything/notebooks/automatic_mask_generator_example.ipynb b/swarms/agents/models/segment_anything/notebooks/automatic_mask_generator_example.ipynb similarity index 100% rename from swarms/workers/models/segment_anything/notebooks/automatic_mask_generator_example.ipynb rename to swarms/agents/models/segment_anything/notebooks/automatic_mask_generator_example.ipynb diff --git a/swarms/workers/models/segment_anything/notebooks/images/dog.jpg b/swarms/agents/models/segment_anything/notebooks/images/dog.jpg similarity index 100% rename from swarms/workers/models/segment_anything/notebooks/images/dog.jpg rename to swarms/agents/models/segment_anything/notebooks/images/dog.jpg diff --git a/swarms/workers/models/segment_anything/notebooks/images/groceries.jpg b/swarms/agents/models/segment_anything/notebooks/images/groceries.jpg similarity index 100% rename from swarms/workers/models/segment_anything/notebooks/images/groceries.jpg rename to swarms/agents/models/segment_anything/notebooks/images/groceries.jpg diff --git a/swarms/workers/models/segment_anything/notebooks/images/truck.jpg b/swarms/agents/models/segment_anything/notebooks/images/truck.jpg similarity index 100% rename from swarms/workers/models/segment_anything/notebooks/images/truck.jpg rename to swarms/agents/models/segment_anything/notebooks/images/truck.jpg diff --git a/swarms/workers/models/segment_anything/notebooks/onnx_model_example.ipynb b/swarms/agents/models/segment_anything/notebooks/onnx_model_example.ipynb similarity index 100% rename from swarms/workers/models/segment_anything/notebooks/onnx_model_example.ipynb rename to swarms/agents/models/segment_anything/notebooks/onnx_model_example.ipynb diff --git a/swarms/workers/models/segment_anything/notebooks/predictor_example.ipynb b/swarms/agents/models/segment_anything/notebooks/predictor_example.ipynb similarity index 100% rename from swarms/workers/models/segment_anything/notebooks/predictor_example.ipynb rename to swarms/agents/models/segment_anything/notebooks/predictor_example.ipynb diff --git a/swarms/workers/models/segment_anything/scripts/amg.py b/swarms/agents/models/segment_anything/scripts/amg.py similarity index 100% rename from swarms/workers/models/segment_anything/scripts/amg.py rename to swarms/agents/models/segment_anything/scripts/amg.py diff --git a/swarms/workers/models/segment_anything/scripts/export_onnx_model.py b/swarms/agents/models/segment_anything/scripts/export_onnx_model.py similarity index 100% rename from swarms/workers/models/segment_anything/scripts/export_onnx_model.py rename to swarms/agents/models/segment_anything/scripts/export_onnx_model.py diff --git a/swarms/workers/models/segment_anything/segment_anything/__init__.py b/swarms/agents/models/segment_anything/segment_anything/__init__.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/__init__.py rename to swarms/agents/models/segment_anything/segment_anything/__init__.py diff --git a/swarms/workers/models/segment_anything/segment_anything/automatic_mask_generator.py b/swarms/agents/models/segment_anything/segment_anything/automatic_mask_generator.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/automatic_mask_generator.py rename to swarms/agents/models/segment_anything/segment_anything/automatic_mask_generator.py diff --git a/swarms/workers/models/segment_anything/segment_anything/build_sam.py b/swarms/agents/models/segment_anything/segment_anything/build_sam.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/build_sam.py rename to swarms/agents/models/segment_anything/segment_anything/build_sam.py diff --git a/swarms/workers/models/segment_anything/segment_anything/modeling/__init__.py b/swarms/agents/models/segment_anything/segment_anything/modeling/__init__.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/modeling/__init__.py rename to swarms/agents/models/segment_anything/segment_anything/modeling/__init__.py diff --git a/swarms/workers/models/segment_anything/segment_anything/modeling/common.py b/swarms/agents/models/segment_anything/segment_anything/modeling/common.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/modeling/common.py rename to swarms/agents/models/segment_anything/segment_anything/modeling/common.py diff --git a/swarms/workers/models/segment_anything/segment_anything/modeling/image_encoder.py b/swarms/agents/models/segment_anything/segment_anything/modeling/image_encoder.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/modeling/image_encoder.py rename to swarms/agents/models/segment_anything/segment_anything/modeling/image_encoder.py diff --git a/swarms/workers/models/segment_anything/segment_anything/modeling/mask_decoder.py b/swarms/agents/models/segment_anything/segment_anything/modeling/mask_decoder.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/modeling/mask_decoder.py rename to swarms/agents/models/segment_anything/segment_anything/modeling/mask_decoder.py diff --git a/swarms/workers/models/segment_anything/segment_anything/modeling/prompt_encoder.py b/swarms/agents/models/segment_anything/segment_anything/modeling/prompt_encoder.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/modeling/prompt_encoder.py rename to swarms/agents/models/segment_anything/segment_anything/modeling/prompt_encoder.py diff --git a/swarms/workers/models/segment_anything/segment_anything/modeling/sam.py b/swarms/agents/models/segment_anything/segment_anything/modeling/sam.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/modeling/sam.py rename to swarms/agents/models/segment_anything/segment_anything/modeling/sam.py diff --git a/swarms/workers/models/segment_anything/segment_anything/modeling/transformer.py b/swarms/agents/models/segment_anything/segment_anything/modeling/transformer.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/modeling/transformer.py rename to swarms/agents/models/segment_anything/segment_anything/modeling/transformer.py diff --git a/swarms/workers/models/segment_anything/segment_anything/predictor.py b/swarms/agents/models/segment_anything/segment_anything/predictor.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/predictor.py rename to swarms/agents/models/segment_anything/segment_anything/predictor.py diff --git a/swarms/workers/models/segment_anything/segment_anything/utils/__init__.py b/swarms/agents/models/segment_anything/segment_anything/utils/__init__.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/utils/__init__.py rename to swarms/agents/models/segment_anything/segment_anything/utils/__init__.py diff --git a/swarms/workers/models/segment_anything/segment_anything/utils/amg.py b/swarms/agents/models/segment_anything/segment_anything/utils/amg.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/utils/amg.py rename to swarms/agents/models/segment_anything/segment_anything/utils/amg.py diff --git a/swarms/workers/models/segment_anything/segment_anything/utils/onnx.py b/swarms/agents/models/segment_anything/segment_anything/utils/onnx.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/utils/onnx.py rename to swarms/agents/models/segment_anything/segment_anything/utils/onnx.py diff --git a/swarms/workers/models/segment_anything/segment_anything/utils/transforms.py b/swarms/agents/models/segment_anything/segment_anything/utils/transforms.py similarity index 100% rename from swarms/workers/models/segment_anything/segment_anything/utils/transforms.py rename to swarms/agents/models/segment_anything/segment_anything/utils/transforms.py diff --git a/swarms/workers/models/segment_anything/setup.cfg b/swarms/agents/models/segment_anything/setup.cfg similarity index 100% rename from swarms/workers/models/segment_anything/setup.cfg rename to swarms/agents/models/segment_anything/setup.cfg diff --git a/swarms/workers/models/segment_anything/setup.py b/swarms/agents/models/segment_anything/setup.py similarity index 100% rename from swarms/workers/models/segment_anything/setup.py rename to swarms/agents/models/segment_anything/setup.py diff --git a/swarms/agents/multi_modal_agent.py b/swarms/agents/multi_modal_agent.py index 2b9eb5a6..bcaf62d4 100644 --- a/swarms/agents/multi_modal_agent.py +++ b/swarms/agents/multi_modal_agent.py @@ -1,6 +1,6 @@ from agent_protocol import Agent, Step, Task -from swarms.workers.multi_modal_workers.multi_modal_agent import MultiModalVisualAgent +from swarms.agents.multi_modal_workers.multi_modal_agent import MultiModalVisualAgent class MultiModalVisualAgent: def __init__( diff --git a/swarms/workers/multi_modal_workers/__init__.py b/swarms/agents/multi_modal_workers/__init__.py similarity index 100% rename from swarms/workers/multi_modal_workers/__init__.py rename to swarms/agents/multi_modal_workers/__init__.py diff --git a/swarms/workers/multi_modal_workers/multi_modal_agent.py b/swarms/agents/multi_modal_workers/multi_modal_agent.py similarity index 98% rename from swarms/workers/multi_modal_workers/multi_modal_agent.py rename to swarms/agents/multi_modal_workers/multi_modal_agent.py index 1515b25f..a3db768d 100644 --- a/swarms/workers/multi_modal_workers/multi_modal_agent.py +++ b/swarms/agents/multi_modal_workers/multi_modal_agent.py @@ -1477,13 +1477,18 @@ class MultiModalVisualAgent: raise ValueError("You have to load ImageCaptioning as a basic function for MultiModalVisualAgent") self.models = {} + for class_name, device in load_dict.items(): self.models[class_name] = globals()[class_name](device=device) for class_name, module in globals().items(): if getattr(module, 'template_model', False): - template_required_names = {k for k in inspect.signature(module.__init__).parameters.keys() if k!='self'} + template_required_names = { + k for k in inspect.signature(module.__init__).parameters.keys() if k!='self' + } + loaded_names = set([type(e).__name__ for e in self.models.values()]) + if template_required_names.issubset(loaded_names): self.models[class_name] = globals()[class_name]( **{name: self.models[name] for name in template_required_names}) @@ -1495,9 +1500,15 @@ class MultiModalVisualAgent: for e in dir(instance): if e.startswith('inference'): func = getattr(instance, e) - self.tools.append(Tool(name=func.name, description=func.description, func=func)) + self.tools.append( + Tool(name=func.name, description=func.description, func=func) + ) + self.llm = OpenAI(temperature=0) - self.memory = ConversationBufferMemory(memory_key="chat_history", output_key='output') + self.memory = ConversationBufferMemory( + memory_key="chat_history", + output_key='output' + ) def init_agent(self, lang): self.memory.clear() @@ -1513,11 +1524,19 @@ class MultiModalVisualAgent: verbose=True, memory=self.memory, return_intermediate_steps=True, - agent_kwargs={'prefix': PREFIX, 'format_instructions': FORMAT_INSTRUCTIONS, - 'suffix': SUFFIX}, ) + agent_kwargs={ + 'prefix': PREFIX, + 'format_instructions': FORMAT_INSTRUCTIONS, + 'suffix': SUFFIX + }, + ) def run_text(self, text): - self.agent.memory.buffer = cut_dialogue_history(self.agent.memory.buffer, keep_last_n_words=500) + self.agent.memory.buffer = cut_dialogue_history( + self.agent.memory.buffer, + keep_last_n_words=500 + ) + res = self.agent({"input": text.strip()}) res['output'] = res['output'].replace("\\", "/") response = re.sub('(image/[-\w]*.png)', lambda m: f'![](file={m.group(0)})*{m.group(0)}*', res['output']) @@ -1533,9 +1552,11 @@ class MultiModalVisualAgent: img = Image.open(image) width, height = img.size ratio = min(512 / width, 512 / height) + width_new, height_new = (round(width * ratio), round(height * ratio)) width_new = int(np.round(width_new / 64.0)) * 64 height_new = int(np.round(height_new / 64.0)) * 64 + img = img.resize((width_new, height_new)) img = img.convert('RGB') img.save(image_filename, "PNG") @@ -1557,13 +1578,4 @@ class MultiModalVisualAgent: return AI_prompt def clear_memory(self): - self.memory.clear() - -# if __name__ == '__main__': -# if not os.path.exists("checkpoints"): -# os.mkdir("checkpoints") -# parser = argparse.ArgumentParser() -# parser.add_argument('--load', type=str, default="ImageCaptioning_cuda:0,Text2Image_cuda:0") -# args = parser.parse_args() -# load_dict = {e.split('_')[0].strip(): e.split('_')[1].strip() for e in args.load.split(',')} -# agent = MultiModalVisualAgent(load_dict=load_dict) \ No newline at end of file + self.memory.clear() \ No newline at end of file diff --git a/swarms/workers/multi_modal_workers/omni_agent/__init__.py b/swarms/agents/multi_modal_workers/omni_agent/__init__.py similarity index 100% rename from swarms/workers/multi_modal_workers/omni_agent/__init__.py rename to swarms/agents/multi_modal_workers/omni_agent/__init__.py diff --git a/swarms/workers/multi_modal_workers/omni_agent/config.yml b/swarms/agents/multi_modal_workers/omni_agent/config.yml similarity index 100% rename from swarms/workers/multi_modal_workers/omni_agent/config.yml rename to swarms/agents/multi_modal_workers/omni_agent/config.yml diff --git a/swarms/workers/multi_modal_workers/omni_agent/get_token_ids.py b/swarms/agents/multi_modal_workers/omni_agent/get_token_ids.py similarity index 100% rename from swarms/workers/multi_modal_workers/omni_agent/get_token_ids.py rename to swarms/agents/multi_modal_workers/omni_agent/get_token_ids.py diff --git a/swarms/workers/multi_modal_workers/omni_agent/model_server.py b/swarms/agents/multi_modal_workers/omni_agent/model_server.py similarity index 100% rename from swarms/workers/multi_modal_workers/omni_agent/model_server.py rename to swarms/agents/multi_modal_workers/omni_agent/model_server.py diff --git a/swarms/workers/multi_modal_workers/omni_agent/omni_chat.py b/swarms/agents/multi_modal_workers/omni_agent/omni_chat.py similarity index 100% rename from swarms/workers/multi_modal_workers/omni_agent/omni_chat.py rename to swarms/agents/multi_modal_workers/omni_agent/omni_chat.py diff --git a/swarms/agents/omni_modal_agent.py b/swarms/agents/omni_modal_agent.py index 5e842dd6..c9d28396 100644 --- a/swarms/agents/omni_modal_agent.py +++ b/swarms/agents/omni_modal_agent.py @@ -1,4 +1,4 @@ -from swarms.workers.multi_modal_workers.omni_agent.omni_chat import chat_huggingface +from swarms.agents.multi_modal_workers.omni_agent.omni_chat import chat_huggingface class OmniModalAgent: diff --git a/swarms/swarms/multi_agent_debate.py b/swarms/swarms/multi_agent_debate.py index ba9682c7..434d48c7 100644 --- a/swarms/swarms/multi_agent_debate.py +++ b/swarms/swarms/multi_agent_debate.py @@ -9,6 +9,11 @@ def select_speaker(step: int, agents: List[Worker]) -> int: class MultiAgentDebate: + """ + MultiAgentDebate + + + """ def __init__( self, agents: List[Worker],