diff --git a/playground/structs/build_your_own_swarm.py b/playground/structs/build_your_own_swarm.py index 8bb47b9c..2c3e377f 100644 --- a/playground/structs/build_your_own_swarm.py +++ b/playground/structs/build_your_own_swarm.py @@ -12,17 +12,15 @@ class MySwarm(BaseSwarm): # agent 2 # agent 3 return "output of the swarm" - - + + # Add your custom swarm to the AutoSwarmRouter -router = AutoSwarmRouter( - swarms=[MySwarm] -) +router = AutoSwarmRouter(swarms=[MySwarm]) # Create an AutoSwarm instance autoswarm = AutoSwarm( - name = "AutoSwarm, an API for all swarms", + name="AutoSwarm, an API for all swarms", description="A simple API to build and run swarms", verbose=True, router=router, @@ -30,4 +28,4 @@ autoswarm = AutoSwarm( # Run the AutoSwarm -autoswarm.run("Analyze these financial data and give me a summary") \ No newline at end of file +autoswarm.run("Analyze these financial data and give me a summary") diff --git a/pyproject.toml b/pyproject.toml index de204024..178c1cb5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "4.6.8" +version = "4.6.9" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/swarms/__init__.py b/swarms/__init__.py index 4d6eef0a..b3f568e2 100644 --- a/swarms/__init__.py +++ b/swarms/__init__.py @@ -17,4 +17,4 @@ from swarms.prompts import * # noqa: E402, F403 from swarms.structs import * # noqa: E402, F403 from swarms.telemetry import * # noqa: E402, F403 from swarms.tools import * # noqa: E402, F403 -from swarms.utils import * # noqa: E402, F403 \ No newline at end of file +from swarms.utils import * # noqa: E402, F403 diff --git a/swarms/models/__init__.py b/swarms/models/__init__.py index 8b60597f..69c737c7 100644 --- a/swarms/models/__init__.py +++ b/swarms/models/__init__.py @@ -38,6 +38,7 @@ from swarms.models.popular_llms import ( ReplicateLLM as Replicate, ) from swarms.models.qwen import QwenVLMultiModal # noqa: E402 + # from swarms.models.sam_supervision import SegmentAnythingMarkGenerator from swarms.models.sampling_params import SamplingParams, SamplingType from swarms.models.together import TogetherLLM # noqa: E402 diff --git a/swarms/models/base_embedding_model.py b/swarms/models/base_embedding_model.py index 04999f12..bb244c6c 100644 --- a/swarms/models/base_embedding_model.py +++ b/swarms/models/base_embedding_model.py @@ -1,7 +1,7 @@ from __future__ import annotations from abc import ABC, abstractmethod -from dataclasses import dataclass, field +from dataclasses import dataclass import numpy as np from typing import Callable diff --git a/swarms/structs/__init__.py b/swarms/structs/__init__.py index 3dbf5488..da47be28 100644 --- a/swarms/structs/__init__.py +++ b/swarms/structs/__init__.py @@ -80,7 +80,6 @@ from swarms.structs.utils import ( ) - __all__ = [ "Agent", "AgentJob", @@ -148,4 +147,4 @@ __all__ = [ "find_agent_by_id", "find_token_in_text", "parse_tasks", -] \ No newline at end of file +] diff --git a/swarms/structs/agent_process.py b/swarms/structs/agent_process.py index 8f0523af..d1931027 100644 --- a/swarms/structs/agent_process.py +++ b/swarms/structs/agent_process.py @@ -16,7 +16,6 @@ class AgentProcess(BaseModel): priority: int = 0 status: str = "Waiting" pid: int = None - def set_pid(self, pid: int): self.pid = pid