pull/432/head
Kye 10 months ago
parent cd58ffadaa
commit ed8fa1852e

@ -12,17 +12,15 @@ class MySwarm(BaseSwarm):
# agent 2 # agent 2
# agent 3 # agent 3
return "output of the swarm" return "output of the swarm"
# Add your custom swarm to the AutoSwarmRouter # Add your custom swarm to the AutoSwarmRouter
router = AutoSwarmRouter( router = AutoSwarmRouter(swarms=[MySwarm])
swarms=[MySwarm]
)
# Create an AutoSwarm instance # Create an AutoSwarm instance
autoswarm = AutoSwarm( 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", description="A simple API to build and run swarms",
verbose=True, verbose=True,
router=router, router=router,
@ -30,4 +28,4 @@ autoswarm = AutoSwarm(
# Run the AutoSwarm # 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")

@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry] [tool.poetry]
name = "swarms" name = "swarms"
version = "4.6.8" version = "4.6.9"
description = "Swarms - Pytorch" description = "Swarms - Pytorch"
license = "MIT" license = "MIT"
authors = ["Kye Gomez <kye@apac.ai>"] authors = ["Kye Gomez <kye@apac.ai>"]

@ -17,4 +17,4 @@ from swarms.prompts import * # noqa: E402, F403
from swarms.structs import * # noqa: E402, F403 from swarms.structs import * # noqa: E402, F403
from swarms.telemetry import * # noqa: E402, F403 from swarms.telemetry import * # noqa: E402, F403
from swarms.tools 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

@ -38,6 +38,7 @@ from swarms.models.popular_llms import (
ReplicateLLM as Replicate, ReplicateLLM as Replicate,
) )
from swarms.models.qwen import QwenVLMultiModal # noqa: E402 from swarms.models.qwen import QwenVLMultiModal # noqa: E402
# from swarms.models.sam_supervision import SegmentAnythingMarkGenerator # from swarms.models.sam_supervision import SegmentAnythingMarkGenerator
from swarms.models.sampling_params import SamplingParams, SamplingType from swarms.models.sampling_params import SamplingParams, SamplingType
from swarms.models.together import TogetherLLM # noqa: E402 from swarms.models.together import TogetherLLM # noqa: E402

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from dataclasses import dataclass, field from dataclasses import dataclass
import numpy as np import numpy as np
from typing import Callable from typing import Callable

@ -80,7 +80,6 @@ from swarms.structs.utils import (
) )
__all__ = [ __all__ = [
"Agent", "Agent",
"AgentJob", "AgentJob",
@ -148,4 +147,4 @@ __all__ = [
"find_agent_by_id", "find_agent_by_id",
"find_token_in_text", "find_token_in_text",
"parse_tasks", "parse_tasks",
] ]

@ -16,7 +16,6 @@ class AgentProcess(BaseModel):
priority: int = 0 priority: int = 0
status: str = "Waiting" status: str = "Waiting"
pid: int = None pid: int = None
def set_pid(self, pid: int): def set_pid(self, pid: int):
self.pid = pid self.pid = pid

Loading…
Cancel
Save