Skip to content

Commit

Permalink
[CLEANUP]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kye committed Mar 27, 2024
1 parent cd58ffa commit ed8fa18
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 13 deletions.
12 changes: 5 additions & 7 deletions playground/structs/build_your_own_swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,20 @@ def run(self, task: str, *args, **kwargs):
# 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,
)


# Run the AutoSwarm
autoswarm.run("Analyze these financial data and give me a summary")
autoswarm.run("Analyze these financial data and give me a summary")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion swarms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
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
from swarms.utils import * # noqa: E402, F403
1 change: 1 addition & 0 deletions swarms/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
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
Expand Down
2 changes: 1 addition & 1 deletion swarms/models/base_embedding_model.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions swarms/structs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
)



__all__ = [
"Agent",
"AgentJob",
Expand Down Expand Up @@ -148,4 +147,4 @@
"find_agent_by_id",
"find_token_in_text",
"parse_tasks",
]
]
1 change: 0 additions & 1 deletion swarms/structs/agent_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed8fa18

Please sign in to comment.